Mix audio streams with cpal in Rust
I’m trying to mix two streams with cpal and write them to a single wav file
The first one is the default Mic, and the second is the Speakers output (It works in cpal on Windows we can use it as input)
The final wav file seems to be invalid, as the length of it isn’t 5 seconds.
How can I mix these two streams and write them in realtime?