From 6bcc4136a8856f1a1bdf02bf5a07549768e08443 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 4 May 2013 21:57:00 +0200 Subject: XMIDI: Forget old loop points when changing track This fixes warnings that would appear after a little while in Kyrandia 2, which would happen because every time the music changed it would add a new loop point. This was probably harmless because once the list was full it would keep re-using the last element, and I imagine all songs were set to loop forever. But this should be more correct, as I understand it. --- audio/midiparser_xmidi.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'audio') diff --git a/audio/midiparser_xmidi.cpp b/audio/midiparser_xmidi.cpp index e7b02bfcbe..fcb45fa5ad 100644 --- a/audio/midiparser_xmidi.cpp +++ b/audio/midiparser_xmidi.cpp @@ -47,6 +47,11 @@ protected: uint32 readVLQ2(byte * &data); void parseNextEvent(EventInfo &info); + virtual void resetTracking() { + MidiParser::resetTracking(); + _loopCount = -1; + } + public: MidiParser_XMIDI(XMidiCallbackProc proc, void *data) : _callbackProc(proc), _callbackData(data), _loopCount(-1) {} ~MidiParser_XMIDI() { } -- cgit v1.2.3