winmm: Separate WINMM_Pause and WINMM_Reset.

This commit is contained in:
Jörg Höhle 2011-09-22 20:36:31 +02:00 committed by Alexandre Julliard
parent 38752f5bf7
commit afa5751015
1 changed files with 6 additions and 4 deletions

View File

@ -1671,17 +1671,18 @@ 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);
WAVEHDR *first; WAVEHDR *first;
MMRESULT mr; HRESULT hr;
TRACE("(%p)\n", hwave); TRACE("(%p)\n", hwave);
if(!WINMM_ValidateAndLock(device)) if(!WINMM_ValidateAndLock(device))
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
mr = WINMM_Pause(hwave); hr = IAudioClient_Stop(device->client);
if(mr != MMSYSERR_NOERROR){ if(FAILED(hr)){
LeaveCriticalSection(&device->lock); LeaveCriticalSection(&device->lock);
return mr; ERR("Stop failed: %08x\n", hr);
return MMSYSERR_ERROR;
} }
device->stopped = TRUE; device->stopped = TRUE;
@ -1694,6 +1695,7 @@ static LRESULT WINMM_Reset(HWAVE hwave)
device->played_frames = 0; device->played_frames = 0;
device->loop_counter = 0; device->loop_counter = 0;
device->last_clock_pos = 0; device->last_clock_pos = 0;
IAudioClient_Reset(device->client);
cb_info = device->cb_info; cb_info = device->cb_info;