Commit cb6ddfc7 authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

winmm: Make the return behavior of waveOutPrepareHeader consistent for 16-bit and 32-bit.

parent 7742fe28
...@@ -1279,15 +1279,26 @@ UINT16 WINAPI waveOutPrepareHeader16(HWAVEOUT16 hWaveOut, /* [in] */ ...@@ -1279,15 +1279,26 @@ UINT16 WINAPI waveOutPrepareHeader16(HWAVEOUT16 hWaveOut, /* [in] */
{ {
LPWINE_MLD wmld; LPWINE_MLD wmld;
LPWAVEHDR lpWaveOutHdr = MapSL(lpsegWaveOutHdr); LPWAVEHDR lpWaveOutHdr = MapSL(lpsegWaveOutHdr);
UINT16 result;
TRACE("(%04X, %08x, %u);\n", hWaveOut, lpsegWaveOutHdr, uSize); TRACE("(%04X, %08x, %u);\n", hWaveOut, lpsegWaveOutHdr, uSize);
if (lpWaveOutHdr == NULL) return MMSYSERR_INVALPARAM; if (lpWaveOutHdr == NULL) return MMSYSERR_INVALPARAM;
if ((wmld = MMDRV_Get(HWAVEOUT_32(hWaveOut), MMDRV_WAVEOUT, FALSE)) == NULL) if ((wmld = MMDRV_Get(HWAVEOUT_32(hWaveOut), MMDRV_WAVEOUT, FALSE)) == NULL)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
if ((result = MMDRV_Message(wmld, WODM_PREPARE, lpsegWaveOutHdr,
uSize, FALSE)) != MMSYSERR_NOTSUPPORTED)
return result;
return MMDRV_Message(wmld, WODM_PREPARE, lpsegWaveOutHdr, uSize, FALSE); if (lpWaveOutHdr->dwFlags & WHDR_INQUEUE)
return WAVERR_STILLPLAYING;
lpWaveOutHdr->dwFlags |= WHDR_PREPARED;
lpWaveOutHdr->dwFlags &= ~WHDR_DONE;
return MMSYSERR_NOERROR;
} }
/************************************************************************** /**************************************************************************
......
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