[NAudioWPFDemo] Not flushing on Stop?

Apr 9, 2012 at 8:21 AM

When using the NAudioWPFDemo, and subsequently code I've created based on it, I have an issue as follows:

  • Load a file
  • Play the file
  • Stop playback mid file

Now if I play another sound file, via the app, or even just clicking the volume mixer in Windows to play the system bell, I'll hear a burst of the audio from the previous clip.


It seems that when the playback is stopped the current buffer isn't flushed?

Is this an issue specific to my audio card/driver, or is this a bug in the code? 

Coordinator
Apr 16, 2012 at 7:44 AM

that's odd. Under the hood, waveOutReset should get called, which is supposed to clear out all internal buffers. Could be a dodgy soundcard driver. Is it a cheap usb headset / built in audio? What OS are you using?

Apr 16, 2012 at 12:20 PM

Thanks for the response.   It's on a notebook (IDT 92HD73C1 Audio) running Windows 7 x64.  It happens after a stop/pause.

I just tried on another PC (also Win 7 x64) and it doesn't have this issue.  The user of the app I've written hasn't complained either, so perhaps I'll just put it down to the poor inbuilt sound card driver.