refactors and customizable time feature

This commit is contained in:
ghaisan
2024-10-09 20:23:53 +07:00
parent b0492aca2e
commit 8ea482b2d6
4 changed files with 91 additions and 46 deletions
+14 -1
View File
@@ -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