]> git.proxmox.com Git - qemu.git/commitdiff
audio/winwave: previous audio buffer should be flushed
authormunkyu.im <munkyu.im@samsung.com>
Tue, 28 Aug 2012 07:42:06 +0000 (16:42 +0900)
committermalc <av1474@comtv.ru>
Tue, 28 Aug 2012 15:11:28 +0000 (19:11 +0400)
Winwave audio backend has problem with pausing and restart audio out.
Unlike other backends, Winwave pausing API does not flush audio buffer.
As a result, the previous audio data are played in front of
user expected sound when user restart audio.
So changes it to waveOutReset()

Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
Signed-off-by: malc <av1474@comtv.ru>
audio/winwaveaudio.c

index 663abb9b508adc6fbf06d11587e6addd55bf8280..72babbf184a199ca08b075166ea5b902ed4bcbad 100644 (file)
@@ -349,21 +349,15 @@ static int winwave_ctl_out (HWVoiceOut *hw, int cmd, ...)
             else {
                 hw->poll_mode = 0;
             }
-            if (wave->paused) {
-                mr = waveOutRestart (wave->hwo);
-                if (mr != MMSYSERR_NOERROR) {
-                    winwave_logerr (mr, "waveOutRestart");
-                }
-                wave->paused = 0;
-            }
+            wave->paused = 0;
         }
         return 0;
 
     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;