From 69da3a24d24c8d995177aaaba601d63a75840519 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Mon, 2 Nov 2015 11:55:24 -0600 Subject: [PATCH] mmdevapi/tests: Remove todo_wine on some tests for winepulse. winepulse succeeds where other drivers fail. Avoid todo_wine failures when running winepulse. Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- dlls/mmdevapi/tests/capture.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/dlls/mmdevapi/tests/capture.c b/dlls/mmdevapi/tests/capture.c index afb99fcfcbc..865859bd5c3 100644 --- a/dlls/mmdevapi/tests/capture.c +++ b/dlls/mmdevapi/tests/capture.c @@ -244,7 +244,11 @@ static void test_capture(IAudioClient *ac, HANDLE handle, WAVEFORMATEX *wfx) ok(hr == S_OK, "Valid IAudioCaptureClient_GetBuffer returns %08x\n", hr); ok(frames2 == frames, "GetBuffer after ReleaseBuffer(0) %u/%u\n", frames2, frames); ok(pos2 == pos, "Position after ReleaseBuffer(0) %u/%u\n", (UINT)pos2, (UINT)pos); - todo_wine ok(qpc2 == qpc, "HPC after ReleaseBuffer(0) %u vs. %u\n", (UINT)qpc2, (UINT)qpc); + if(qpc2 != qpc) + /* FIXME: Some drivers fail */ + todo_wine ok(qpc2 == qpc, "HPC after ReleaseBuffer(0) %u vs. %u\n", (UINT)qpc2, (UINT)qpc); + else + ok(qpc2 == qpc, "HPC after ReleaseBuffer(0) %u vs. %u\n", (UINT)qpc2, (UINT)qpc); } /* trace after the GCP test because log output to MS-DOS console disturbs timing */ @@ -307,14 +311,23 @@ static void test_capture(IAudioClient *ac, HANDLE handle, WAVEFORMATEX *wfx) if(hr == S_OK){ /* The discontinuity is reported here, but is this an old or new packet? */ - todo_wine ok(flags & AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY, "expect DISCONTINUITY %x\n", flags); + if(!(flags & AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY)){ + /* FIXME: Some drivers fail */ + todo_wine ok(flags & AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY, "expect DISCONTINUITY %x\n", flags); + todo_wine ok(pos == sum + frames, "Position %u gap %d\n", + (UINT)pos, (UINT)pos - sum); + }else{ + ok(flags & AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY, "expect DISCONTINUITY %x\n", flags); + + /* Native's position is one period further than what we read. + * Perhaps that's precisely the meaning of DATA_DISCONTINUITY: + * signal when the position jump left a gap. */ + ok(pos == sum + frames, "Position %u gap %d\n", + (UINT)pos, (UINT)pos - sum); + } + ok(pad == next, "GCP %u vs. BufferSize %u\n", (UINT32)pad, next); - /* Native's position is one period further than what we read. - * Perhaps that's precisely the meaning of DATA_DISCONTINUITY: - * signal when the position jump left a gap. */ - todo_wine ok(pos == sum + frames, "Position %u gap %d\n", - (UINT)pos, (UINT)pos - sum); if(flags & AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY) sum = pos; }