Kevin,
I don't think this is correct. Our job is to enumerate devices available to Wine; the 'default' device is generally card #0, device #0 on that card. A system may well have multiple card and multiple devices within a card; by setting this to 'default', you have prevented a meaningful scan.
I've actually got a fairly large patch coming which reorganizes Alsa device discovery to be more correct, imho. (I iterate through the cards, and iterate through device on cards; I detect and mark as the wine default the default card identified by Alsa config; I respect ALSA card/device environment variables, and, finally, I allow for explict device name override within Wine).
I'm stymied currently by the fact that my patch correctly identifies a greater range of devices reported by Alsa, but then, at least with my laptop's sound card, one of the devices reported doesn't work for beans. I'm trying to figure a way to detect that card 0, device 4 doesn't work for beans so I can strip it from the results; once I finish that (if I can), I'll submit the larger patch.
Cheers,
Jeremy
Kevin Koltzau wrote:
With ALSA 1.0, the device name "default" should be used. "default" is mapped to plug:hw by default, but allows remapping from your alsa config
Index: dlls/winmm/winealsa/audio.c
RCS file: /home/wine/wine/dlls/winmm/winealsa/audio.c,v retrieving revision 1.85 diff -u -d -r1.85 audio.c --- dlls/winmm/winealsa/audio.c 9 Jun 2005 09:49:31 -0000 1.85 +++ dlls/winmm/winealsa/audio.c 13 Jun 2005 00:47:09 -0000 @@ -714,7 +714,7 @@ /******************************************************************
ALSA_GetDeviceFromReg
- Returns either "plug:hw" or reads the registry so the user can
*/
- Returns either "default" or reads the registry so the user can
- override the playback/record device used.
static char *ALSA_GetDeviceFromReg(const char *value) @@ -741,7 +741,7 @@
end: if (!result)
result = ALSA_strdup("plug:hw");
result = ALSA_strdup("default");
if (key) RegCloseKey(key);
On Sunday 12 June 2005 09:52 pm, Jeremy White wrote:
I don't think this is correct. Our job is to enumerate
To be honest I didn't think it was correct either, but the current solution does not work correctly either so I figured I'd give it a shot.
I have default overridden to pass through dmix/dsnoop, wine cannot access my card directly through plug:hw the majority of the time. Using the PlaybackDevice config option is a good enough hack for me for now