From a3def2744f73e7286afddde31c1613f5e6f03bf6 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Wed, 9 Mar 2011 23:34:15 +0000 Subject: [PATCH] - Fix a compiler warning - Fix the detection of the enumeration extensions - Fix default device for s_alInputDevice - Adjust formatting of S_AL_Info output --- code/client/snd_openal.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/code/client/snd_openal.c b/code/client/snd_openal.c index 5ea58bda..2fe7e7dc 100644 --- a/code/client/snd_openal.c +++ b/code/client/snd_openal.c @@ -45,7 +45,7 @@ cvar_t *s_alInputDevice; cvar_t *s_alAvailableDevices; cvar_t *s_alAvailableInputDevices; -static enumeration_ext = qfalse; +static qboolean enumeration_ext = qfalse; /* ================= @@ -2275,18 +2275,18 @@ static void S_AL_SoundInfo( void ) { Com_Printf( "OpenAL info:\n" ); - Com_Printf( " Vendor: %s\n", qalGetString( AL_VENDOR ) ); - Com_Printf( " Version: %s\n", qalGetString( AL_VERSION ) ); - Com_Printf( " Renderer: %s\n", qalGetString( AL_RENDERER ) ); - Com_Printf( " AL Extensions: %s\n", qalGetString( AL_EXTENSIONS ) ); + Com_Printf( " Vendor: %s\n", qalGetString( AL_VENDOR ) ); + Com_Printf( " Version: %s\n", qalGetString( AL_VERSION ) ); + Com_Printf( " Renderer: %s\n", qalGetString( AL_RENDERER ) ); + Com_Printf( " AL Extensions: %s\n", qalGetString( AL_EXTENSIONS ) ); Com_Printf( " ALC Extensions: %s\n", qalcGetString( alDevice, ALC_EXTENSIONS ) ); if(enumeration_ext) { - Com_Printf(" Device: %s\n", qalcGetString(alDevice, ALC_DEVICE_SPECIFIER)); - Com_Printf("Available Devices:\n%s", s_alAvailableDevices->string); + Com_Printf(" Device: %s\n", qalcGetString(alDevice, ALC_DEVICE_SPECIFIER)); + Com_Printf(" Available Devices:\n%s", s_alAvailableDevices->string); #ifdef USE_VOIP - Com_Printf("Input Device: %s\n", qalcGetString(alCaptureDevice, ALC_DEVICE_SPECIFIER)); - Com_Printf("Available Input Devices:\n%s", s_alAvailableInputDevices->string); + Com_Printf(" Input Device: %s\n", qalcGetString(alCaptureDevice, ALC_DEVICE_SPECIFIER)); + Com_Printf(" Available Input Devices:\n%s", s_alAvailableInputDevices->string); #endif } } @@ -2366,8 +2366,8 @@ qboolean S_AL_Init( soundInterface_t *si ) s_alGraceDistance = Cvar_Get("s_alGraceDistance", "512", CVAR_CHEAT); s_alDriver = Cvar_Get( "s_alDriver", ALDRIVER_DEFAULT, CVAR_ARCHIVE | CVAR_LATCH ); - s_alInputDevice = Cvar_Get( "s_alInputDevice", ALDRIVER_DEFAULT, CVAR_ARCHIVE | CVAR_LATCH ); + s_alInputDevice = Cvar_Get( "s_alInputDevice", "", CVAR_ARCHIVE | CVAR_LATCH ); s_alDevice = Cvar_Get("s_alDevice", "", CVAR_ARCHIVE | CVAR_LATCH); // Load QAL @@ -2386,8 +2386,8 @@ qboolean S_AL_Init( soundInterface_t *si ) inputdevice = NULL; // Device enumeration support - if(qalcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT") || - (enumeration_ext = qalcIsExtensionPresent(NULL, "ALC_ENUMERATE_ALL_EXT")) + if((enumeration_ext = qalcIsExtensionPresent(NULL, "ALC_ENUMERATE_ALL_EXT")) || + qalcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT") ) { char devicenames[1024] = "";