how do i flush sound buffer
-
how do i flush sound buffer . i need it because while playing in between if press stop button , it is retaining contents in buffer and again if i press play button it is getting overlapped with previous content of the buffer and there is glitch (problem)while playing at the beginning. i am using "waveoutopen" function
-
how do i flush sound buffer . i need it because while playing in between if press stop button , it is retaining contents in buffer and again if i press play button it is getting overlapped with previous content of the buffer and there is glitch (problem)while playing at the beginning. i am using "waveoutopen" function
The problem is you apparently are not stopping the waveOut and Closing the device before you start playing another soung, you're actually appending the new song data to the one still playing. To flush the buffer, use
waveOutReset()
and supply it the handle you got back in the first parameter passed towaveOutOpen
, then use that same handle withwaveOutClose
to close and release the device. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome