This project has moved and is read-only. For the latest updates, please go here.

disabling MessageBoxes put up by NAudio -URGENT

Jun 15, 2012 at 11:22 AM

Hi, I am using Naudio (1.5) in a non-GUI application and I see an occassional "Wavefile not closed" messageBox at shutdown. I dont want the application stuck due to an open messagebox since this is intended for untrained users who dont even interact with the PC directly. An exception or log message would be ok since it can be handled silently and other parts of app can continue to run.

Is there a way to disable the messageboxes? User trial starts in couple of days!

tks,

nan

Jun 15, 2012 at 11:27 AM

these are Debug.Asserts and are warning you that you did not dispose of something correctly. There are some heavy-handed ways of disabling Debug.Assert (e.g. http://stackoverflow.com/questions/2854024/how-to-prevent-debug-assert-to-show-a-modal-dialog). Alternatively, get the NAudio code and do a release build and these won't be included. In the future I plan for official releases of NAudio to be done with release builds, but I have tended to use debug builds in the past as I find these asserts helpful for tracking down problems.

Jun 15, 2012 at 12:45 PM

thanks mark, that was super fast!!

yes, I agree that they are useful just that I have not yet tested all code paths so cant predict where else they may pop up. I will try the release build too.

thanks once again for the prompt response and keep up the great work!

nan