From 654a00415db46e5038f8d46fbbcd85461c472575 Mon Sep 17 00:00:00 2001 From: Paul van Schayck Date: Wed, 16 Feb 2005 17:51:37 +0000 Subject: [PATCH] Change detection order to: OSS-ALSA-ARTS-JACK. --- programs/winecfg/audio.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/programs/winecfg/audio.c b/programs/winecfg/audio.c index d89d2eba32f..7d9a9b7e173 100644 --- a/programs/winecfg/audio.c +++ b/programs/winecfg/audio.c @@ -96,6 +96,24 @@ char *audioAutoDetect(void) argv_new[1] = "-c"; argv_new[3] = NULL; + /* try to detect oss */ + fd = open("/dev/dsp", O_WRONLY | O_NONBLOCK); + if(fd) + { + close(fd); + driversFound[numFound] = "wineoss.drv"; + name[numFound] = "OSS"; + numFound++; + } + + /* try to detect alsa */ + if(!stat("/proc/asound", &buf)) + { + driversFound[numFound] = "winealsa.drv"; + name[numFound] = "Alsa"; + numFound++; + } + /* try to detect arts */ argv_new[2] = "ps awx|grep artsd|grep -v grep|grep artsd > /dev/null"; if(!spawnvp(_P_WAIT, "/bin/sh", argv_new)) @@ -120,25 +138,6 @@ char *audioAutoDetect(void) /* try to detect audioIO (solaris) */ /* TODO */ - /* try to detect alsa */ - if(!stat("/proc/asound", &buf)) - { - driversFound[numFound] = "winealsa.drv"; - name[numFound] = "Alsa"; - numFound++; - } - - /* try to detect oss */ - fd = open("/dev/dsp", O_WRONLY | O_NONBLOCK); - if(fd) - { - close(fd); - driversFound[numFound] = "wineoss.drv"; - name[numFound] = "OSS"; - numFound++; - } - - if(numFound == 0) { MessageBox(NULL, "Could not detect any audio devices/servers", "Failed", MB_OK); -- 2.11.4.GIT