Commit d322d63b authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

winmm: Set default sound driver to alsa,oss,coreaudio.

parent 4b4cfff4
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "winbase.h" #include "winbase.h"
#include "mmddk.h" #include "mmddk.h"
#define WINE_DEFAULT_WINMM_DRIVER "oss" #define WINE_DEFAULT_WINMM_DRIVER "alsa,oss,coreaudio"
#define WINE_DEFAULT_WINMM_MAPPER "msacm32.drv" #define WINE_DEFAULT_WINMM_MAPPER "msacm32.drv"
#define WINE_DEFAULT_WINMM_MIDI "midimap.dll" #define WINE_DEFAULT_WINMM_MIDI "midimap.dll"
......
...@@ -82,12 +82,12 @@ static const char* DSound_Bits[] = { ...@@ -82,12 +82,12 @@ static const char* DSound_Bits[] = {
static const AUDIO_DRIVER sAudioDrivers[] = { static const AUDIO_DRIVER sAudioDrivers[] = {
{IDS_DRIVER_ALSA, "alsa"}, {IDS_DRIVER_ALSA, "alsa"},
{IDS_DRIVER_ESOUND, "esd"},
{IDS_DRIVER_OSS, "oss"}, {IDS_DRIVER_OSS, "oss"},
{IDS_DRIVER_COREAUDIO, "coreaudio"},
{IDS_DRIVER_JACK, "jack"}, {IDS_DRIVER_JACK, "jack"},
{IDS_DRIVER_NAS, "nas"}, {IDS_DRIVER_NAS, "nas"},
{IDS_DRIVER_ESOUND, "esd"},
{IDS_DRIVER_AUDIOIO, "audioio"}, {IDS_DRIVER_AUDIOIO, "audioio"},
{IDS_DRIVER_COREAUDIO, "coreaudio"},
{0, ""} {0, ""}
}; };
...@@ -623,41 +623,13 @@ static void initAudioDlg (HWND hDlg) ...@@ -623,41 +623,13 @@ static void initAudioDlg (HWND hDlg)
buf = get_reg_key(config_key, "Drivers", "Audio", NULL); buf = get_reg_key(config_key, "Drivers", "Audio", NULL);
/* check for first time install and set a default driver /* check for first time install and set a default driver
* select in this order: oss, alsa, first available driver, none * select first available driver, and if that fails: none
*/ */
if (buf == NULL) if (buf == NULL)
{ {
const AUDIO_DRIVER *pAudioDrv = NULL; /* select first available driver */
if (*loadedAudioDrv->szDriver)
/* select oss if available */ selectDriver(hDlg, loadedAudioDrv->szDriver);
for (pAudioDrv = loadedAudioDrv; pAudioDrv->nameID; pAudioDrv++)
{
if (strcmp(pAudioDrv->szDriver, "oss") == 0)
{
selectDriver(hDlg, "oss");
break;
}
}
if (strlen(curAudioDriver) == 0)
{
/* select alsa if available */
for (pAudioDrv = loadedAudioDrv; pAudioDrv->nameID; pAudioDrv++)
{
if (strcmp(pAudioDrv->szDriver, "alsa") == 0)
{
selectDriver(hDlg, "alsa");
break;
}
}
}
if (strlen(curAudioDriver) == 0)
{
/* select first available driver */
if (*loadedAudioDrv->szDriver)
selectDriver(hDlg, loadedAudioDrv->szDriver);
}
} }
else /* make a local copy of the current registry setting */ else /* make a local copy of the current registry setting */
strcpy(curAudioDriver, buf); strcpy(curAudioDriver, buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment