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

This commit is contained in:
Andrew Nguyen 2009-01-25 02:56:48 -06:00 committed by Alexandre Julliard
parent 7742fe283a
commit cb6ddfc75b
1 changed files with 13 additions and 2 deletions

View File

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