HEnquist / wasapi-rs

Simple Wasapi bindings for Rust
MIT License
47 stars 12 forks source link

How to play recorded.raw file? #17

Closed LuckyHookin closed 1 year ago

LuckyHookin commented 1 year ago

I'm sorry. I can't convert this file to MP3, can you give some hints?

HEnquist commented 1 year ago

From the record example? It stores the raw data without any header. You can import it in any audio editor that supports importing raw data. Audacity works fine for example. Select 32-bit little-endian float and 2 channels.

LuckyHookin commented 1 year ago

@HEnquist Thanks for the reply! But Render mode seems to be a bit problematic, sometimes it speeds up and there is a current sound.

https://user-images.githubusercontent.com/45350455/204091427-b09fb30a-039b-4f08-9f76-aad8a7fdceb7.mp4

HEnquist commented 1 year ago

Did you run the example with cargo run --example --release? If not, please try that.

LuckyHookin commented 1 year ago

I found that record.rs is not using the same output device as the music player, and the problem was solved when they were using the same output device. Thanks!