Fix thread exit problem.

This commit is contained in:
Johns 2013-01-06 14:47:00 +01:00
parent 7cd025a023
commit 534b4094b5

View File

@ -2851,13 +2851,16 @@ void AudioInit(void)
*/
void AudioExit(void)
{
const AudioModule * module;
#ifdef USE_AUDIO_THREAD
if (AudioUsedModule->Thread) { // supports threads
AudioExitThread();
}
#endif
AudioUsedModule->Exit();
module = AudioUsedModule;
AudioUsedModule = &NoopModule;
module->Exit();
AudioRingExit();
AudioRunning = 0;
AudioPaused = 0;