diff options
author | Matthew Hoops | 2012-11-18 14:43:35 -0500 |
---|---|---|
committer | Matthew Hoops | 2012-11-18 14:43:35 -0500 |
commit | b285db4db33943e0355ea33b1504d237ede0aa2a (patch) | |
tree | 856482dc7e94c528f807ae968e0ab99b8a7ec818 | |
parent | ca6fdb0807bf9ee46b6341685c129e27451db0f6 (diff) | |
download | scummvm-rg350-b285db4db33943e0355ea33b1504d237ede0aa2a.tar.gz scummvm-rg350-b285db4db33943e0355ea33b1504d237ede0aa2a.tar.bz2 scummvm-rg350-b285db4db33943e0355ea33b1504d237ede0aa2a.zip |
AUDIO: Cleanup MidiParser_QT a bit
-rw-r--r-- | audio/midiparser_qt.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/audio/midiparser_qt.cpp b/audio/midiparser_qt.cpp index 3e95703728..2b7ef63e37 100644 --- a/audio/midiparser_qt.cpp +++ b/audio/midiparser_qt.cpp @@ -109,7 +109,7 @@ void MidiParser_QT::parseNextEvent(EventInfo &info) { uint32 delta = 0; while (_queuedEvents.empty()) - delta = readNextEvent(); + delta += readNextEvent(); info = _queuedEvents.pop(); info.delta = delta; @@ -342,16 +342,17 @@ bool MidiParser_QT::isChannelAllocated(byte channel) const { } bool MidiParser_QT::allChannelsAllocated() const { - // Less than 16? Have room + // Less than 15? We definitely have room if (_channelMap.size() < 15) return false; - // 16? See if one of those + // 15? One of the allocated channels might be the percussion one if (_channelMap.size() == 15) for (ChannelMap::const_iterator it = _channelMap.begin(); it != _channelMap.end(); it++) if (it->_value == 9) return false; + // 16 -> definitely all allocated return true; } |