[PATCH 1/6] winmm: MCI open always creates an alias for subsequent commands.

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Wed Sep 1 10:50:43 CDT 2010


Hi,

This patch has been sitting in my tree since November last year but
it's only recently that I went out to analyse all the boundary cases.

The attached test case does not suffice to prove the change, but I've
conducted many more tests on native machines and testbot (e.g. jobs
#4879, 4870) as evidence.

I'll be able to submit these additional tests after
 - adding tests/mciavi.c which I want as test target
   (mciwave is problematic because of win95 "change to C:" nastiness,
    mcicda because most tests are skipped in a default wine install,
    mciseq would work, but it's time to start tests with mciavi)
 - fixing the parser for "sysinfo waveaudio ..."
   IIRC I mentioned in an earlier patch that the sysinfo command inside
   test_AutoOpenWAVE() works as a side effect of a bug in Wine.
   Eliminating the bug (which I've done but is not yet submitable) imposes
   that I fix sysinfo because we don't want things that once worked in
   the tests to fail, even though that happened by chance.

The precise observer might note that my patch doesn't do things
exactly like native does:
+ /* In most cases, natives adds MCI_OPEN_ALIAS to the flags passed to the driver.
+  * Don't.  The drivers don't care about the winmm alias. */

I don't know why native winmm adds MCI_OPEN_ALIAS to the flags that
the MCI driver gets to see in most cases but not in all of them.
(E.g. mciSendCommand MCI_OPEN_TYPE adds it, but not MCI_OPEN_TYPE_ID.)
I prefer not to touch the MCI_OPEN_PARMS.  It's not even necessary.
What matters is how device names are resolved into MCI devices,
i.e. GetDeviceID.  For instance a reference "waveaudio" is defined even
when using OPEN_TYPE_ID without OPEN_ELEMENT nor OPEN_ALIAS).

The goal: GetDeviceID must look up a single name per entry!
It used to lookup Alias, Element and DeviceName.

However before I can fix GetDeviceID, many other things need be
changed so as not to cause regressions.  That's why I have half a
dozen more patches in my queue that I'll submit later (and still need
to fix sysinfo).
That's why I can only slowly add GetDeviceID tests.  The code patches
here only eliminate the todo_wine without adding new tests.

So here come 1+3+2 patches, ordered such that the tests continue to
work.  The last 2 are completely unrelated but will help Octavian
Voicu with 64bit work.
As I said, I have more in my queue, but this initial set stands on its own.

Regards,
 Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-winmm-MCI-open-always-creates-an-alias-for-subseque.patch
Type: application/octet-stream
Size: 4081 bytes
Desc: 0001-winmm-MCI-open-always-creates-an-alias-for-subseque.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100901/bdc26398/attachment.obj>


More information about the wine-patches mailing list