apocalypse
apocalypse

Reputation: 5884

NAudio directSound.stop issue (?)

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.

Upvotes: 0

Views: 403

Answers (1)

Mark Heath
Mark Heath

Reputation: 49492

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.

Upvotes: 1

Related Questions