audio/winwave: previous audio buffer should be flushed
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>
This commit is contained in:
parent
36c6711bbe
commit
13ef70f64e
|
@ -349,21 +349,15 @@ static int winwave_ctl_out (HWVoiceOut *hw, int cmd, ...)
|
||||||
else {
|
else {
|
||||||
hw->poll_mode = 0;
|
hw->poll_mode = 0;
|
||||||
}
|
}
|
||||||
if (wave->paused) {
|
wave->paused = 0;
|
||||||
mr = waveOutRestart (wave->hwo);
|
|
||||||
if (mr != MMSYSERR_NOERROR) {
|
|
||||||
winwave_logerr (mr, "waveOutRestart");
|
|
||||||
}
|
|
||||||
wave->paused = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case VOICE_DISABLE:
|
case VOICE_DISABLE:
|
||||||
if (!wave->paused) {
|
if (!wave->paused) {
|
||||||
mr = waveOutPause (wave->hwo);
|
mr = waveOutReset (wave->hwo);
|
||||||
if (mr != MMSYSERR_NOERROR) {
|
if (mr != MMSYSERR_NOERROR) {
|
||||||
winwave_logerr (mr, "waveOutPause");
|
winwave_logerr (mr, "waveOutReset");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
wave->paused = 1;
|
wave->paused = 1;
|
||||||
|
|
Loading…
Reference in New Issue