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

This commit is contained in:
Maarten Lankhorst 2007-10-08 20:11:13 +02:00 committed by Alexandre Julliard
parent 4b4cfff4ba
commit d322d63b10
2 changed files with 7 additions and 35 deletions

View file

@ -25,7 +25,7 @@
#include "winbase.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_MIDI "midimap.dll"

View file

@ -82,12 +82,12 @@ static const char* DSound_Bits[] = {
static const AUDIO_DRIVER sAudioDrivers[] = {
{IDS_DRIVER_ALSA, "alsa"},
{IDS_DRIVER_ESOUND, "esd"},
{IDS_DRIVER_OSS, "oss"},
{IDS_DRIVER_COREAUDIO, "coreaudio"},
{IDS_DRIVER_JACK, "jack"},
{IDS_DRIVER_NAS, "nas"},
{IDS_DRIVER_ESOUND, "esd"},
{IDS_DRIVER_AUDIOIO, "audioio"},
{IDS_DRIVER_COREAUDIO, "coreaudio"},
{0, ""}
};
@ -623,41 +623,13 @@ static void initAudioDlg (HWND hDlg)
buf = get_reg_key(config_key, "Drivers", "Audio", NULL);
/* 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)
{
const AUDIO_DRIVER *pAudioDrv = NULL;
/* select oss if available */
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);
}
/* select first available driver */
if (*loadedAudioDrv->szDriver)
selectDriver(hDlg, loadedAudioDrv->szDriver);
}
else /* make a local copy of the current registry setting */
strcpy(curAudioDriver, buf);