Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: nodriver calling waveInPrepareHeader

$
0
0

I'm running into the same problem.

I'm using your (just added) WaveInEvent, and when I pull the plug of the Mic while recording I get a MMException "NoDriver" in WaveInPrepareHeader called in WaveInBuffer::Reuse().

This exception is thrown in WaveInEvent's recording-thread so there is no way for me to catch it.
Letting it escalate to the application's Unhandled Exception handler is of no use since there's no way to keep running the program in that case - it has to exit.

Am I correct in assuming there is no handling for unforeseen events like unplugged devices ?
Anyway, I'm fixing it locally by modifying the WaveInEvent's recording thread to handle the exception by flipping 'recording' to false, but I'd rather not work with locally modified versions of NAudio of course ;)

Cheers,

Lennart.


Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>