From cd122f944b6c3b5f07be72fcfb80e6e4a5f6966f Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 22 Mar 2012 21:23:18 +0000 Subject: [PATCH] - Similar fix to the previous: The child TiMidity++ process quitting would not necessarily be detected, so S_ChangeMusic() would not restart one-shot songs that had finished if it was the MIDI device. SVN r3463 (trunk) --- src/sound/music_midistream.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sound/music_midistream.cpp b/src/sound/music_midistream.cpp index 80fd77044..d031caab5 100644 --- a/src/sound/music_midistream.cpp +++ b/src/sound/music_midistream.cpp @@ -518,7 +518,11 @@ void MIDIStreamer::Stop() bool MIDIStreamer::IsPlaying() { - if (EndQueued != 0 && EndQueued < 4) + if (m_Status != STATE_Stopped && MIDI == NULL || (EndQueued != 0 && EndQueued < 4)) + { + Stop(); + } + if (m_Status != STATE_Stopped && !MIDI->IsOpen()) { Stop(); }