Clear buffers before deleting the sources

This fixes a very long lasting shutdown procedure which made it look
like Quake II freezed. Especially on slow machines it was a problem.
This commit is contained in:
Yamagi Burmeister 2012-05-26 11:37:47 +02:00
parent 37132d8ac9
commit 28c4edfd69
1 changed files with 2 additions and 1 deletions

View File

@ -145,6 +145,8 @@ fail:
void AL_Shutdown( void ) {
Com_Printf( "Shutting down OpenAL.\n" );
S_AL_StreamDie();
qalDeleteSources(1, &streamSource);
qalDeleteFilters(1, &underwaterFilter);
@ -154,7 +156,6 @@ void AL_Shutdown( void ) {
memset( s_srcnums, 0, sizeof( s_srcnums ) );
s_numchannels = 0;
}
S_AL_StreamDie();
QAL_Shutdown();
}