mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- fixed crash with non-looping music ending.
In this case it was the song terminating the stream, with the new setup the main music code has to do this itself.
This commit is contained in:
parent
83e8e5535d
commit
a76cdd0946
2 changed files with 11 additions and 3 deletions
|
@ -979,6 +979,7 @@ bool MIDIStreamer::SetSubsong(int subsong)
|
|||
|
||||
bool MIDIStreamer::ServiceStream(void* buff, int len)
|
||||
{
|
||||
if (!MIDI) return false;
|
||||
return static_cast<SoftSynthMIDIDevice*>(MIDI.get())->ServiceStream(buff, len);
|
||||
}
|
||||
|
||||
|
|
|
@ -277,10 +277,17 @@ void S_UpdateMusic ()
|
|||
// [RH] Update music and/or playlist. IsPlaying() must be called
|
||||
// to attempt to reconnect to broken net streams and to advance the
|
||||
// playlist when the current song finishes.
|
||||
if (!mus_playing.handle->IsPlaying() && PlayList)
|
||||
if (!mus_playing.handle->IsPlaying())
|
||||
{
|
||||
PlayList->Advance();
|
||||
S_ActivatePlayList(false);
|
||||
if (PlayList)
|
||||
{
|
||||
PlayList->Advance();
|
||||
S_ActivatePlayList(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
S_StopMusic(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue