A very small PR for a change, and for yet another ID Software game.
Orcs and Elves has an issue where it constantly tries to stop a MIDI stream before loading another one in. However, this doesn't go well when the stream is already stopped and seems to be buggy even when it's still playing, with the game entering a loop of endlessly issuing stop calls until it hits a Stack Overflow when notifying listeners.
Basically, it ends up like this:
If we check isRunning() before actually issuing stop() calls, this is no longer the case and the game can be played normally (assuming #199 's fix for memory leaks in ID games is taken into account).
Still, this game has yet another bug where MIDI streams only play a single time after they're loaded, which means that you can't use the same weapon 2 times and hear the SFX two times for example. Didn't track that one down yet.
A very small PR for a change, and for yet another ID Software game.
Orcs and Elves has an issue where it constantly tries to stop a MIDI stream before loading another one in. However, this doesn't go well when the stream is already stopped and seems to be buggy even when it's still playing, with the game entering a loop of endlessly issuing stop calls until it hits a Stack Overflow when notifying listeners.
Basically, it ends up like this:
If we check isRunning() before actually issuing stop() calls, this is no longer the case and the game can be played normally (assuming #199 's fix for memory leaks in ID games is taken into account).
Still, this game has yet another bug where MIDI streams only play a single time after they're loaded, which means that you can't use the same weapon 2 times and hear the SFX two times for example. Didn't track that one down yet.