diff options
-rw-r--r-- | engines/sci/sound/midiparser_sci.h | 2 | ||||
-rw-r--r-- | engines/sci/sound/music.cpp | 4 | ||||
-rw-r--r-- | engines/sci/sound/music.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/sound/midiparser_sci.h b/engines/sci/sound/midiparser_sci.h index d9ae583aff..e33e613dd6 100644 --- a/engines/sci/sound/midiparser_sci.h +++ b/engines/sci/sound/midiparser_sci.h @@ -78,7 +78,7 @@ public: } protected: - bool isChannelUsed(byte channel) { return _channelsUsed & (1 << channel); } + bool isChannelUsed(byte channel) const { return _channelsUsed & (1 << channel); } void setChannelUsed(byte channel) { _channelsUsed |= (1 << channel); } void parseNextEvent(EventInfo &info); diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 1d186647f8..e1300373e7 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -179,8 +179,8 @@ void SciMusic::findUsedChannels() { for (int k = 0; k < 16; k++) _usedChannels[k] = false; - const MusicList::iterator end = _playList.end(); - for (MusicList::iterator i = _playList.begin(); i != end; ++i) { + const MusicList::const_iterator end = _playList.end(); + for (MusicList::const_iterator i = _playList.begin(); i != end; ++i) { for (int channel = 0; channel < 16; channel++) { if ((*i)->soundRes && (*i)->soundRes->isChannelUsed(channel)) _usedChannels[channel] = true; diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h index f5eb7ce8d9..83cd59e89b 100644 --- a/engines/sci/sound/music.h +++ b/engines/sci/sound/music.h @@ -211,7 +211,7 @@ protected: private: static void miditimerCallback(void *p); void findUsedChannels(); - int16 getNextUnusedChannel() { + int16 getNextUnusedChannel() const { for (int i = 0; i < 16; i++) { if (!_usedChannels[i]) return i; |