mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +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)
|
bool MIDIStreamer::ServiceStream(void* buff, int len)
|
||||||
{
|
{
|
||||||
|
if (!MIDI) return false;
|
||||||
return static_cast<SoftSynthMIDIDevice*>(MIDI.get())->ServiceStream(buff, len);
|
return static_cast<SoftSynthMIDIDevice*>(MIDI.get())->ServiceStream(buff, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -277,11 +277,18 @@ void S_UpdateMusic ()
|
||||||
// [RH] Update music and/or playlist. IsPlaying() must be called
|
// [RH] Update music and/or playlist. IsPlaying() must be called
|
||||||
// to attempt to reconnect to broken net streams and to advance the
|
// to attempt to reconnect to broken net streams and to advance the
|
||||||
// playlist when the current song finishes.
|
// playlist when the current song finishes.
|
||||||
if (!mus_playing.handle->IsPlaying() && PlayList)
|
if (!mus_playing.handle->IsPlaying())
|
||||||
|
{
|
||||||
|
if (PlayList)
|
||||||
{
|
{
|
||||||
PlayList->Advance();
|
PlayList->Advance();
|
||||||
S_ActivatePlayList(false);
|
S_ActivatePlayList(false);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
S_StopMusic(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue