winmm: Allow larger MMTIME sizes.

This commit is contained in:
Andrew Eikum 2014-12-15 10:21:52 -06:00 committed by Alexandre Julliard
parent 0d490f3a49
commit cba322d71d
2 changed files with 14 additions and 3 deletions

View File

@ -487,7 +487,12 @@ static void check_position(int device, HWAVEOUT wout, DWORD bytes,
DWORD returned;
mmtime.wType = TIME_BYTES;
rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime));
rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime) - 1);
ok(rc==MMSYSERR_ERROR,
"waveOutGetPosition(%s): rc=%s\n",dev_name(device),wave_out_error(rc));
mmtime.wType = TIME_BYTES;
rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime) + 1);
ok(rc==MMSYSERR_NOERROR,
"waveOutGetPosition(%s): rc=%s\n",dev_name(device),wave_out_error(rc));
if (mmtime.wType != TIME_BYTES && winetest_debug > 1)

View File

@ -2981,9 +2981,12 @@ UINT WINAPI waveOutGetPosition(HWAVEOUT hWaveOut, LPMMTIME lpTime,
{
TRACE("(%p, %p, %u)\n", hWaveOut, lpTime, uSize);
if(!uSize || !lpTime || uSize != sizeof(MMTIME))
if(!uSize || !lpTime)
return MMSYSERR_INVALPARAM;
if(uSize < sizeof(MMTIME))
return MMSYSERR_ERROR;
return WINMM_GetPosition((HWAVE)hWaveOut, lpTime);
}
@ -3602,9 +3605,12 @@ UINT WINAPI waveInGetPosition(HWAVEIN hWaveIn, LPMMTIME lpTime,
{
TRACE("(%p, %p, %u)\n", hWaveIn, lpTime, uSize);
if(!uSize || !lpTime || uSize != sizeof(MMTIME))
if(!uSize || !lpTime)
return MMSYSERR_INVALPARAM;
if(uSize < sizeof(MMTIME))
return MMSYSERR_ERROR;
return WINMM_GetPosition((HWAVE)hWaveIn, lpTime);
}