mirror of
https://github.com/ghaisanghaisan/morse_rs.git
synced 2026-08-12 05:46:19 -05:00
refactors and customizable time feature
This commit is contained in:
@@ -18,7 +18,7 @@ morse_rs = "0.1.2"
|
||||
|
||||
## Usage
|
||||
|
||||
converts a string to morse then writes the encoded message into a wav file.
|
||||
Converts a string to morse then writes the encoded message into a wav file.
|
||||
|
||||
```rust
|
||||
use morse_rs::{to_morse, write_morse};
|
||||
@@ -31,6 +31,19 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
We can also write the morse into a buffer in memory
|
||||
|
||||
```rust
|
||||
use morse_rs::{to_morse, write_morse};
|
||||
|
||||
fn main() {
|
||||
let my_message = "attack at noon";
|
||||
let morse = to_morse_inmemory(my_message);
|
||||
|
||||
write_morse("my_message.wav", &morse);
|
||||
}
|
||||
```
|
||||
|
||||
## TODO
|
||||
- Decode morse from sound
|
||||
- Add proper rust like error return types
|
||||
|
||||
Reference in New Issue
Block a user