http://bugs.winehq.org/show_bug.cgi?id=14559
--- Comment #75 from Andrew Eikum aeikum@codeweavers.com 2011-12-05 10:36:58 CST --- Created attachment 37809 --> http://bugs.winehq.org/attachment.cgi?id=37809 winmm: Make input and output devices have unique names
Thanks Igor.
Here's another patch, which should be applied on top of the PREFERRED_GET patch from Comment 70. It's kind of a stab in the dark. Here's my reasoning, based off of your log.
The application gets the device information for both of your input devices. For a reason I don't understand, it seems to use the device caps for input device 1 instead of input device 0. Eventually, this happens (trimmed for clarity):
0025:trace:winmm:mixerGetDevCapsA (0, 0x33fb44, 48) 0025:trace:winmm:mixerGetDevCapsA (1, 0x33fb44, 48) 0025:trace:winmm:mixerGetDevCapsA (2, 0x33fb44, 48) 0025:trace:winmm:mixerGetDevCapsA (3, 0x33fb44, 48) 0025:trace:winmm:mixerOpen (0x485f9c, 3, 0, 0, 0) 0025:trace:winmm:mixerGetLineInfoA (0xc300, 0x33faf4, 3) 0025:trace:winmm:mixerGetLineInfoW dwComponentType: 0x7
This looks like they're iterating over the mixers until they find one that matches a certain criteria. Then they ask that mixer for information about the WAVEIN component. However, mixer 3 on your computer is an output-only mixer, so the GetLineInfo(WAVEIN) call returns an error.
So it looks like their iteration over the mixers ends too early. One likely heuristic for finding the "correct" mixer is when the desired WAVEINCAPS.szPname matches MIXERCAPS.szPname.
Your output devices look like: 0: plughw:0,0 1: plughw:1,3 2: plughw:0,1 3: default
And input: 0: plughw:0,2 1: default
Notice that input device 1 and output device 3 have the same name, "default". So my guess is that it's looking for a mixer with the name "default" and stopping on mixer 3, instead of finding mixer 5 which is the correct one.
So this patch gives each device a unique name by inserting "out" or "in" into the device name for output and input devices. I'd appreciate another log with both patches applied to see if this makes a difference.