mmdevapi/tests: Add format tests.

Joerg-Cyril.Hoehle at Joerg-Cyril.Hoehle at
Fri Oct 7 09:50:52 CDT 2011


Andrew Eikum wrote:

> +    todo_wine ok(broken(unk != NULL), ...
I'll comment on that separately.

>> +static void test_formats(AUDCLNT_SHAREMODE mode)
>The code in this function is very difficult to follow.
Indeed, it became more and more convoluted as I dug into native's
"exclusive mode disabled" and other exceptions to the rule.
And it's not even handling 5:1 cards correctly!
Luckily, I needn't add todo_wine on top of that...
For instance, winmm:wave.ok is so convoluted that
one cannot tell any more what it actually checks.
I'll think about a different approach with better expressiveness.
For now, I consider it's time to get more tests into git
and to gather results on

>> +        ok((hr == S_FALSE)^(pwfx2 == NULL), "hr %x<->suggest %p\n", hr, pwfx2);
>> +        if (pwfx2 == (WAVEFORMATEX*)0xDEADF00D) /* bug in Wine */
>Would be nicer to both fix the bug in Wine and have a test showing the correct behavior.
That is the correct behavior AFAICT: S_FALSE <=> set pwfx2
I've not yet submitted all of my patches about IsFormatSupported
but you're right, that's an easy patch away.  I forgot that one.
For sure 5:1 needs more testing and I have no such HW.  You have.

>> +        win_skip("mmdevapi not available: 0x%08x\n", hr);
>I think that's valid behavior, so we shouldn't fail.
Ouch.  I thought "Wine has dlls/mmdevapi, so it should always load",
but shows that Solaris doesn't appear to have mmdevapi. Why?

	Jörg Höhle

More information about the wine-devel mailing list