--- ioquake3-git/code/client/snd_openal.c 2014-03-15 17:46:01.000000000 -0400 +++ ioquake3-sdl2/code/client/snd_openal.c 2014-08-17 17:22:08.000000000 -0400 @@ -745,9 +745,8 @@ srcCount++; } - // All done. Print this for informational purposes - Com_Printf( "Allocated %d sources.\n", srcCount); alSourcesInitialised = qtrue; + return qtrue; } @@ -769,6 +768,8 @@ for(i = 0; i < srcCount; i++) { curSource = &srcList[i]; + + srcList[i].isLocked = qfalse; if(curSource->isLocked) Com_DPrintf( S_COLOR_YELLOW "WARNING: Source %d is locked\n", i); @@ -2218,6 +2219,18 @@ /* ================= +S_AL_ClearSoundBuffer +================= +*/ +static +void S_AL_ClearSoundBuffer( void ) +{ + S_AL_SrcShutdown( ); + S_AL_SrcInit( ); +} + +/* +================= S_AL_StopAllSounds ================= */ @@ -2229,6 +2242,7 @@ S_AL_StopBackgroundTrack(); for (i = 0; i < MAX_RAW_STREAMS; i++) S_AL_StreamDie(i); + S_AL_ClearSoundBuffer(); } /* @@ -2346,16 +2360,6 @@ /* ================= -S_AL_ClearSoundBuffer -================= -*/ -static -void S_AL_ClearSoundBuffer( void ) -{ -} - -/* -================= S_AL_SoundList ================= */ @@ -2620,6 +2624,9 @@ S_AL_BufferInit( ); S_AL_SrcInit( ); + // Print this for informational purposes + Com_Printf( "Allocated %d sources.\n", srcCount); + // Set up OpenAL parameters (doppler, etc) qalDistanceModel(AL_INVERSE_DISTANCE_CLAMPED); qalDopplerFactor( s_alDopplerFactor->value );