Commit 5f9e03d1 authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

winmm: waveOutReset returns all buffers.

parent afa57510
...@@ -1670,6 +1670,7 @@ static LRESULT WINMM_Reset(HWAVE hwave) ...@@ -1670,6 +1670,7 @@ static LRESULT WINMM_Reset(HWAVE hwave)
{ {
WINMM_CBInfo cb_info; WINMM_CBInfo cb_info;
WINMM_Device *device = WINMM_GetDeviceFromHWAVE(hwave); WINMM_Device *device = WINMM_GetDeviceFromHWAVE(hwave);
BOOL is_out;
WAVEHDR *first; WAVEHDR *first;
HRESULT hr; HRESULT hr;
...@@ -1686,9 +1687,6 @@ static LRESULT WINMM_Reset(HWAVE hwave) ...@@ -1686,9 +1687,6 @@ static LRESULT WINMM_Reset(HWAVE hwave)
} }
device->stopped = TRUE; 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->first = device->last = device->playing = NULL;
device->ofs_bytes = 0; device->ofs_bytes = 0;
...@@ -1698,6 +1696,7 @@ static LRESULT WINMM_Reset(HWAVE hwave) ...@@ -1698,6 +1696,7 @@ static LRESULT WINMM_Reset(HWAVE hwave)
IAudioClient_Reset(device->client); IAudioClient_Reset(device->client);
cb_info = device->cb_info; cb_info = device->cb_info;
is_out = device->render ? TRUE : FALSE;
LeaveCriticalSection(&device->lock); LeaveCriticalSection(&device->lock);
...@@ -1705,7 +1704,7 @@ static LRESULT WINMM_Reset(HWAVE hwave) ...@@ -1705,7 +1704,7 @@ static LRESULT WINMM_Reset(HWAVE hwave)
WAVEHDR *next = first->lpNext; WAVEHDR *next = first->lpNext;
first->dwFlags &= ~WHDR_INQUEUE; first->dwFlags &= ~WHDR_INQUEUE;
first->dwFlags |= WHDR_DONE; first->dwFlags |= WHDR_DONE;
if(device->render) if(is_out)
WINMM_NotifyClient(&cb_info, WOM_DONE, (DWORD_PTR)first, 0); WINMM_NotifyClient(&cb_info, WOM_DONE, (DWORD_PTR)first, 0);
else else
WINMM_NotifyClient(&cb_info, WIM_DATA, (DWORD_PTR)first, 0); WINMM_NotifyClient(&cb_info, WIM_DATA, (DWORD_PTR)first, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment