winmm: Separate WINMM_Pause and WINMM_Reset.
This commit is contained in:
parent
38752f5bf7
commit
afa5751015
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue