=?UTF-8?Q?J=C3=B6rg=20H=C3=B6hle=20?=: winmm: waveOutReset returns all buffers.

Alexandre Julliard julliard at winehq.org
Mon Sep 26 16:15:12 CDT 2011


Module: wine
Branch: master
Commit: 5f9e03d1187f48a1cb25336cb04c513dd237f849
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5f9e03d1187f48a1cb25336cb04c513dd237f849

Author: Jörg Höhle <hoehle at users.sourceforge.net>
Date:   Thu Sep 22 20:47:14 2011 +0200

winmm: waveOutReset returns all buffers.

---

 dlls/winmm/waveform.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c
index 1593047..3ab7976 100644
--- a/dlls/winmm/waveform.c
+++ b/dlls/winmm/waveform.c
@@ -1670,6 +1670,7 @@ static LRESULT WINMM_Reset(HWAVE hwave)
 {
     WINMM_CBInfo cb_info;
     WINMM_Device *device = WINMM_GetDeviceFromHWAVE(hwave);
+    BOOL is_out;
     WAVEHDR *first;
     HRESULT hr;
 
@@ -1686,10 +1687,7 @@ static LRESULT WINMM_Reset(HWAVE hwave)
     }
     device->stopped = TRUE;
 
-    if(device->render)
-        first = WOD_MarkDoneHeaders(device);
-    else
-        first = device->first;
+    first = device->first;
     device->first = device->last = device->playing = NULL;
     device->ofs_bytes = 0;
     device->played_frames = 0;
@@ -1698,6 +1696,7 @@ static LRESULT WINMM_Reset(HWAVE hwave)
     IAudioClient_Reset(device->client);
 
     cb_info = device->cb_info;
+    is_out = device->render ? TRUE : FALSE;
 
     LeaveCriticalSection(&device->lock);
 
@@ -1705,7 +1704,7 @@ static LRESULT WINMM_Reset(HWAVE hwave)
         WAVEHDR *next = first->lpNext;
         first->dwFlags &= ~WHDR_INQUEUE;
         first->dwFlags |= WHDR_DONE;
-        if(device->render)
+        if(is_out)
             WINMM_NotifyClient(&cb_info, WOM_DONE, (DWORD_PTR)first, 0);
         else
             WINMM_NotifyClient(&cb_info, WIM_DATA, (DWORD_PTR)first, 0);




More information about the wine-cvs mailing list