Commit cba322d7 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

winmm: Allow larger MMTIME sizes.

parent 0d490f3a
......@@ -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)
......
......@@ -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);
}
......
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