Commit 8d4b3626 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Fix the check_position() test: on Windows waveOutGetPosition() returns

the number of samples played plus one (also one extra sample for the byte count).
parent 54751b23
...@@ -204,18 +204,18 @@ static void check_position(int device, HWAVEOUT wout, double duration, LPWAVEFOR ...@@ -204,18 +204,18 @@ static void check_position(int device, HWAVEOUT wout, double duration, LPWAVEFOR
ok(rc==MMSYSERR_NOERROR, ok(rc==MMSYSERR_NOERROR,
"waveOutGetPosition: device=%s rc=%s\n",dev_name(device),wave_out_error(rc)); "waveOutGetPosition: device=%s rc=%s\n",dev_name(device),wave_out_error(rc));
if (mmtime.wType == TIME_BYTES) if (mmtime.wType == TIME_BYTES)
ok(mmtime.u.cb==duration*pwfx->nAvgBytesPerSec, ok(mmtime.u.cb==duration*pwfx->nAvgBytesPerSec+pwfx->wBitsPerSample/8,
"waveOutGetPosition returned %ld bytes, should be %ld\n", "waveOutGetPosition returned %ld bytes, should be %ld\n",
mmtime.u.cb, (DWORD)(duration*pwfx->nAvgBytesPerSec)); mmtime.u.cb, (DWORD)(duration*pwfx->nAvgBytesPerSec)+pwfx->wBitsPerSample/8);
mmtime.wType = TIME_SAMPLES; mmtime.wType = TIME_SAMPLES;
rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime)); rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime));
ok(rc==MMSYSERR_NOERROR, ok(rc==MMSYSERR_NOERROR,
"waveOutGetPosition: device=%s rc=%s\n",dev_name(device),wave_out_error(rc)); "waveOutGetPosition: device=%s rc=%s\n",dev_name(device),wave_out_error(rc));
if (mmtime.wType == TIME_SAMPLES) if (mmtime.wType == TIME_SAMPLES)
ok(mmtime.u.sample==duration*pwfx->nSamplesPerSec, ok(mmtime.u.sample==duration*pwfx->nSamplesPerSec+1,
"waveOutGetPosition returned %ld samples, should be %ld\n", "waveOutGetPosition returned %ld samples, should be %ld\n",
mmtime.u.sample, (DWORD)(duration*pwfx->nSamplesPerSec)); mmtime.u.sample, (DWORD)(duration*pwfx->nSamplesPerSec)+1);
mmtime.wType = TIME_MS; mmtime.wType = TIME_MS;
rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime)); rc=waveOutGetPosition(wout, &mmtime, sizeof(mmtime));
......
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