Why is one more data chunk fetched from WaveProvider
after I call Stop on DirectSoundOut
? It happens even after a pause.
I am using NAudio 1.5.
Why is one more data chunk fetched from WaveProvider
after I call Stop on DirectSoundOut
? It happens even after a pause.
I am using NAudio 1.5.
It's just an artefact of the way DirectSoundOut
has been written. It's open source so you can see the code here. You could probably stop this by putting a check for PlaybackState == PlaybackState.Stopped
just after the call to WaitHandle.WaitAny
in PlaybackThreadFunc
.