mmsystem: Handle WAVE_FORMAT_QUERY case.
This commit is contained in:
parent
3d94ea8215
commit
64742c99fc
|
@ -1257,11 +1257,10 @@ UINT16 WINAPI waveOutOpen16(HWAVEOUT16* lphWaveOut, UINT16 uDeviceID,
|
||||||
ret = waveOutOpen(&hWaveOut, (uDeviceID == (UINT16)-1) ? (UINT)-1 : uDeviceID,
|
ret = waveOutOpen(&hWaveOut, (uDeviceID == (UINT16)-1) ? (UINT)-1 : uDeviceID,
|
||||||
lpFormat, (DWORD)thunk, dwInstance, dwFlags);
|
lpFormat, (DWORD)thunk, dwInstance, dwFlags);
|
||||||
|
|
||||||
if (ret == MMSYSERR_NOERROR)
|
if (lphWaveOut != NULL && ret == MMSYSERR_NOERROR)
|
||||||
{
|
*lphWaveOut = HWAVEOUT_16(hWaveOut);
|
||||||
if (lphWaveOut != NULL) *lphWaveOut = HWAVEOUT_16(hWaveOut);
|
if (ret == MMSYSERR_NOERROR && !(dwFlags & WAVE_FORMAT_QUERY))
|
||||||
MMSYSTDRV_SetHandle(thunk, (void*)hWaveOut);
|
MMSYSTDRV_SetHandle(thunk, (void*)hWaveOut);
|
||||||
}
|
|
||||||
else MMSYSTDRV_DeleteThunk(thunk);
|
else MMSYSTDRV_DeleteThunk(thunk);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1550,11 +1549,10 @@ UINT16 WINAPI waveInOpen16(HWAVEIN16* lphWaveIn, UINT16 uDeviceID,
|
||||||
ret = waveInOpen(&hWaveIn, (uDeviceID == (UINT16)-1) ? (UINT)-1 : uDeviceID,
|
ret = waveInOpen(&hWaveIn, (uDeviceID == (UINT16)-1) ? (UINT)-1 : uDeviceID,
|
||||||
lpFormat, (DWORD)thunk, dwInstance, dwFlags);
|
lpFormat, (DWORD)thunk, dwInstance, dwFlags);
|
||||||
|
|
||||||
if (ret == MMSYSERR_NOERROR)
|
if (lphWaveIn != NULL && ret == MMSYSERR_NOERROR)
|
||||||
{
|
*lphWaveIn = HWAVEIN_16(hWaveIn);
|
||||||
if (lphWaveIn != NULL) *lphWaveIn = HWAVEIN_16(hWaveIn);
|
if (ret == MMSYSERR_NOERROR && !(dwFlags & WAVE_FORMAT_QUERY))
|
||||||
MMSYSTDRV_SetHandle(thunk, (void*)hWaveIn);
|
MMSYSTDRV_SetHandle(thunk, (void*)hWaveIn);
|
||||||
}
|
|
||||||
else MMSYSTDRV_DeleteThunk(thunk);
|
else MMSYSTDRV_DeleteThunk(thunk);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue