summaryrefslogtreecommitdiff
path: root/src/client/snd_openal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/snd_openal.c')
-rw-r--r--src/client/snd_openal.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/snd_openal.c b/src/client/snd_openal.c
index 660525dd..28a7d2ee 100644
--- a/src/client/snd_openal.c
+++ b/src/client/snd_openal.c
@@ -246,8 +246,6 @@ S_AL_BufferUnload
*/
static void S_AL_BufferUnload(sfxHandle_t sfx)
{
- ALenum error;
-
if(knownSfx[sfx].filename[0] == '\0')
return;
@@ -257,7 +255,7 @@ static void S_AL_BufferUnload(sfxHandle_t sfx)
// Delete it
S_AL_ClearError( qfalse );
qalDeleteBuffers(1, &knownSfx[sfx].buffer);
- if((error = qalGetError()) != AL_NO_ERROR)
+ if(qalGetError() != AL_NO_ERROR)
Com_Printf( S_COLOR_RED "ERROR: Can't delete sound buffer for %s\n",
knownSfx[sfx].filename);
@@ -692,7 +690,6 @@ qboolean S_AL_SrcInit( void )
{
int i;
int limit;
- ALenum error;
// Clear the sources data structure
memset(srcList, 0, sizeof(srcList));
@@ -711,7 +708,7 @@ qboolean S_AL_SrcInit( void )
for(i = 0; i < limit; i++)
{
qalGenSources(1, &srcList[i].alSource);
- if((error = qalGetError()) != AL_NO_ERROR)
+ if(qalGetError() != AL_NO_ERROR)
break;
srcCount++;
}
@@ -2459,20 +2456,26 @@ qboolean S_AL_Init( soundInterface_t *si )
{
char devicenames[16384] = "";
const char *devicelist;
+#ifdef _WIN32
const char *defaultdevice;
+#endif
int curlen;
// get all available devices + the default device name.
if(enumeration_all_ext)
{
devicelist = qalcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER);
+#ifdef _WIN32
defaultdevice = qalcGetString(NULL, ALC_DEFAULT_ALL_DEVICES_SPECIFIER);
+#endif
}
else
{
// We don't have ALC_ENUMERATE_ALL_EXT but normal enumeration.
devicelist = qalcGetString(NULL, ALC_DEVICE_SPECIFIER);
+#ifdef _WIN32
defaultdevice = qalcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
+#endif
enumeration_ext = qtrue;
}