I need to record sounds from the microphone as a wav file, and got it to work pretty fast using WasapiCapture. Thanks for putting together such a useful library, Mark.
However, I am running into an issue. Because I need this to work on Windows XP as well, I replaced:
this.waveIn = new WasapiCapture(recordingDevice);
with the following code:
var waveIn = new WaveIn();
waveIn.WaveFormat = new WaveFormat(8000, 1);
this.waveIn = waveIn;
Bizarrely, the code stops working, and DataIsAvailable stops being called.
I found a thread which listed an issue, but it didn't seem that there was a resolution:
this.waveIn.DataAvailable += new EventHandler<WaveInEventArgs>(DataIsAvailable);
Any suggestions highly welcome! If this is of any help, I am running this on a BackgroundWorker.
Cheers, and thanks again for the great job,