ruuda / hound

A wav encoding and decoding library in Rust
https://codeberg.org/ruuda/hound
Apache License 2.0
489 stars 65 forks source link

Writing a wav in memory #85

Open PaulDotSH opened 1 month ago

PaulDotSH commented 1 month ago

Hi, I have a usecase where I would need to send the wav to a server and I would like to write it in memory and send it that way, there shouldn't be a need to touch the disk at all, is this possible with hound? Since write_sample only works on a WavWriter which requires seek which isnt implemented by BufWriter

ruuda commented 1 month ago

Yes this is possible, you can write to an std::io::Cursor<Vec<u8>>.