Skip to contentSkip to conversation

audio: previous audio buffer should be flushed

PATCH New munkyu.im 1 participant 2 messages Aug 27, 2012

lore
Share & tools
lore

munkyu.im

author
#0 lore raw

PATCH 1/1 audio: previous audio buffer should be flushed

*** BLURB HERE ***

munkyu.im (1):
audio: previous audio buffer should be flushed

 audio/winwaveaudio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.4.1
author
#1 lore raw

PATCH 1/1 audio: previous audio buffer should be flushed

Buffer must be flushed when audio out is paused, but Winwave audio backend has problem with this unlike other backends. As a result, when user stop and restart audio files or something, the previous audio data are played in front of user expected sound. So changes it to waveOutReset()

---
 audio/winwaveaudio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
audio/winwaveaudio.c +2 -2
index 663abb9..7de12a6 100644
@@ -361,9 +361,9 @@ static int winwave_ctl_out (HWVoiceOut *hw, int cmd, ...)
 
     case VOICE_DISABLE:
         if (!wave->paused) {
-            mr = waveOutPause (wave->hwo);
+            mr = waveOutReset (wave->hwo);
             if (mr != MMSYSERR_NOERROR) {
-                winwave_logerr (mr, "waveOutPause");
+                winwave_logerr (mr, "waveOutReset");
             }
             else {
                 wave->paused = 1;
Signature · 1 line
1.7.4.1