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

MmException issue

Aug 7, 2012 at 2:34 PM
Edited Aug 7, 2012 at 2:35 PM

As a part of a bigger program I am including a wave player. I have used Naudio for this. Where I define a WaveFileReader and a WaveOut object. I use a simple button that toggles between pause and play. When the usb headset is removed I am able to use try and catch to handle the MmException. As the waveout reaches the end of the wavefile I use the playbackStopped event to reset the player. However, if the headset is removed during the playback I get "MmException was unhandled" "NoDriver calling WaveOutWrite".

I don't know how to catch that exception, I would really appreciate all the help I can get! :)

Aug 7, 2012 at 2:37 PM

I've addressed this problem in the latest version of the code. Now you get an exception in the PlaybackStopped event that tells you that playback stopped because of a problem. You can either download the code and build it yourself, or if you know how to use NuGet with pre-release packages, you can download one of those


Aug 8, 2012 at 7:01 AM

I tried downloading the latest sourcecode. After a bit of experimenting with the new playbackStopped event i got it working.
Thank you so much for your quick response and the amazing tool that is naudio!