This project has moved. For the latest updates, please go here.

write wasapicapture and wasapiloopbackcapture to the same file

Sep 11, 2015 at 9:30 PM
Edited Sep 11, 2015 at 9:31 PM
I'm trying to write the input from a WasapiCapture and WasapiLoopbackCapture to a wave file similar to I don't want to write to separate files and then mix later but would rather mix before writing to 1 file. I'm having trouble wrapping my head around the more complex method described in Can somebody give a more detailed example?
Sep 15, 2015 at 8:11 AM
It's fairly tricky to write, Basically when audio arrives from both sources, I'd put it into a BufferedWaveProvider. If both BufferedWaveProviders have more than a set amount of data in, mix that amount of audio into the mixed file. Otherwise wait for more to arrive. Then when recording ends, make sure you mix the last leftovers. I'm afraid I don't have a code sample to share at the moment.