0

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
apocalypse
  • 5,764
  • 9
  • 47
  • 95

1 Answers1

1

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.

Mark Heath
  • 48,273
  • 29
  • 137
  • 194
  • Thx, I downloaded the code already but it is too complicated for me. Tomorrow expect questions about ASIO crashing my app :O – apocalypse Aug 09 '12 at 17:53