diff options
author | Torbjörn Andersson | 2013-05-04 21:57:00 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2013-05-04 21:57:00 +0200 |
commit | 6bcc4136a8856f1a1bdf02bf5a07549768e08443 (patch) | |
tree | 74512412c4f51e7584bef325f0aabac25a491a75 /audio | |
parent | d2a97a409eb37015aae6e8575d63ce42c8552eec (diff) | |
download | scummvm-rg350-6bcc4136a8856f1a1bdf02bf5a07549768e08443.tar.gz scummvm-rg350-6bcc4136a8856f1a1bdf02bf5a07549768e08443.tar.bz2 scummvm-rg350-6bcc4136a8856f1a1bdf02bf5a07549768e08443.zip |
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.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/midiparser_xmidi.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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() { } |