winmm: waveOutReset returns all buffers.
authorJörg Höhle <hoehle@users.sourceforge.net>
Thu, 22 Sep 2011 18:47:14 +0000 (20:47 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 26 Sep 2011 16:09:31 +0000 (18:09 +0200)
dlls/winmm/waveform.c

index 1593047dd42579de673d6eef3cc4168ee7c88dcb..3ab79766165b91fb42eedf33c0370394a160b3d9 100644 (file)
@@ -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);