From dff45536637ad7c5b7ebcce2498f379f27ce8500 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 7 Nov 2010 14:25:08 +0000 Subject: [PATCH] - fixed: When playing non-looping songs GMESong::Read could return without releasing the critical section. SVN r2988 (trunk) --- src/sound/i_music.cpp | 2 -- src/sound/music_gme.cpp | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sound/i_music.cpp b/src/sound/i_music.cpp index ba98b470d4..0eedfbdc88 100644 --- a/src/sound/i_music.cpp +++ b/src/sound/i_music.cpp @@ -477,8 +477,6 @@ MusInfo *I_RegisterSong (const char *filename, BYTE *musiccache, int offset, int EMIDIType miditype = IdentifyMIDIType(id, sizeof(id)); if (miditype != MIDI_NOTMIDI) { - TArray midi; - EMidiDevice devtype = (EMidiDevice)device; retry_as_fmod: diff --git a/src/sound/music_gme.cpp b/src/sound/music_gme.cpp index 08700c8b33..0c3d8c8c39 100644 --- a/src/sound/music_gme.cpp +++ b/src/sound/music_gme.cpp @@ -349,6 +349,7 @@ bool GMESong::Read(SoundStream *stream, void *buff, int len, void *userdata) else { memset(buff, 0, len); + song->CritSec.Leave(); return false; } }