Change detection order to: OSS-ALSA-ARTS-JACK.

This commit is contained in:
Paul van Schayck 2005-02-16 17:51:37 +00:00 committed by Alexandre Julliard
parent 7df337514b
commit 654a00415d
1 changed files with 18 additions and 19 deletions

View File

@ -96,6 +96,24 @@ char *audioAutoDetect(void)
argv_new[1] = "-c"; argv_new[1] = "-c";
argv_new[3] = NULL; 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 */ /* try to detect arts */
argv_new[2] = "ps awx|grep artsd|grep -v grep|grep artsd > /dev/null"; argv_new[2] = "ps awx|grep artsd|grep -v grep|grep artsd > /dev/null";
if(!spawnvp(_P_WAIT, "/bin/sh", argv_new)) if(!spawnvp(_P_WAIT, "/bin/sh", argv_new))
@ -120,25 +138,6 @@ char *audioAutoDetect(void)
/* try to detect audioIO (solaris) */ /* try to detect audioIO (solaris) */
/* TODO */ /* 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) if(numFound == 0)
{ {
MessageBox(NULL, "Could not detect any audio devices/servers", "Failed", MB_OK); MessageBox(NULL, "Could not detect any audio devices/servers", "Failed", MB_OK);