aboutsummaryrefslogtreecommitdiff
path: root/audio/winwaveaudio.c
diff options
context:
space:
mode:
authormunkyu.im <munkyu.im@samsung.com>2012-08-28 16:42:06 +0900
committermalc <av1474@comtv.ru>2012-08-28 19:11:28 +0400
commit13ef70f64e9e4d7583fbd9918d8ea76194023d37 (patch)
tree1ee465155572cb542fc64795b4e2a75563b39cfc /audio/winwaveaudio.c
parent36c6711bbe79642b0102416a9dd4243505e874a6 (diff)
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>
Diffstat (limited to 'audio/winwaveaudio.c')
-rw-r--r--audio/winwaveaudio.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/audio/winwaveaudio.c b/audio/winwaveaudio.c
index 663abb9b50..72babbf184 100644
--- a/audio/winwaveaudio.c
+++ b/audio/winwaveaudio.c
@@ -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;