From 7e2f7099c892c212409f1c7b69426cd1a1f00552 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 7 Sep 2012 09:49:33 -0400 Subject: AUDIO: Keep track of the QuickTime MIDI time scale --- audio/midiparser_qt.cpp | 2 ++ audio/midiparser_qt.h | 1 + 2 files changed, 3 insertions(+) diff --git a/audio/midiparser_qt.cpp b/audio/midiparser_qt.cpp index 8ddf6d66e7..7b20f62cb7 100644 --- a/audio/midiparser_qt.cpp +++ b/audio/midiparser_qt.cpp @@ -69,6 +69,7 @@ bool MidiParser_QT::loadFromTune(Common::SeekableReadStream *stream, DisposeAfte trackInfo.data = (byte *)malloc(trackSize); stream->read(trackInfo.data, trackSize); + trackInfo.timeScale = 600; // the default _trackInfo.push_back(trackInfo); initCommon(); @@ -182,6 +183,7 @@ void MidiParser_QT::initFromContainerTracks() { MIDITrackInfo trackInfo; trackInfo.noteRequests = entry->_noteRequests; trackInfo.data = readWholeTrack(tracks[i]); + trackInfo.timeScale = tracks[i]->timeScale; _trackInfo.push_back(trackInfo); } } diff --git a/audio/midiparser_qt.h b/audio/midiparser_qt.h index 0047803fc4..6e4ded8e74 100644 --- a/audio/midiparser_qt.h +++ b/audio/midiparser_qt.h @@ -75,6 +75,7 @@ private: struct MIDITrackInfo { NoteRequestList noteRequests; byte *data; + uint32 timeScale; }; class MIDISampleDesc : public SampleDesc { -- cgit v1.2.3