The Stop method of WaveOut will hang on the waveOutReset(hWaveOut) call when using a callback function. This is because in the callback function it tries to queue another buffer which attempts to lock waveOutLock - causing a deadlock. To resolve
the problem, move the statement "playbackState = PlaybackState.Stopped" to before the "lock (waveOutLock)" statement in WaveOut.Stop().
Note: When calling waveOutReset queued buffers are returned during the call to waveOutReset. This is not a problem when using a callback window.
One other problem identified: If you intend using the SPEEX codec for playing back SPEEX encoded wave files, you may need to increase the default size of the extraData array in WaveFormatExtraData. The default size is 100 bytes but the codec I use requires more
(120 works fine for me). This stops an array bounds exception that you would otherwise get.