--- arts/flow/audioioalsa9.cc.ark 2004-01-27 13:51:36.000000000 +0100 +++ arts/flow/audioioalsa9.cc 2004-01-27 14:01:08.000000000 +0100 @@ -275,13 +275,21 @@ return audio_write_fd; case autoDetect: + { /* * that the ALSA driver could be compiled doesn't say anything * about whether it will work (the user might be using an OSS - * kernel driver) so we'll use a value less than the OSS one - * here, because OSS will most certainly work (ALSA's OSS emu) + * kernel driver). + * If we can open the device, it'll work - and we'll have to use + * a higher number than OSS to avoid buggy OSS emulation being used. */ - return 5; + int card = -1; + if (snd_card_next(&card) < 0 || card < 0) { + // No ALSA drivers in use... + return 0; + } + return 11; + } default: return param(p);