aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWalter van Niftrik2010-09-09 12:46:46 +0000
committerWalter van Niftrik2010-09-09 12:46:46 +0000
commit8264bb704feca50ab6f9f6dcd000b924e0fcd11a (patch)
tree7966d1986f915e467ba3ec062f16b82a8f23c2a2 /engines
parent065e19092a48c85089bef3c7e1a07b92bf3453b2 (diff)
downloadscummvm-rg350-8264bb704feca50ab6f9f6dcd000b924e0fcd11a.tar.gz
scummvm-rg350-8264bb704feca50ab6f9f6dcd000b924e0fcd11a.tar.bz2
scummvm-rg350-8264bb704feca50ab6f9f6dcd000b924e0fcd11a.zip
SCI: Add getLastChannel() function to MidiPlayer class
svn-id: r52655
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/sound/drivers/midi.cpp8
-rw-r--r--engines/sci/sound/drivers/mididriver.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index dc229262c7..11697c02ed 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -56,6 +56,7 @@ public:
byte getPlayId();
int getPolyphony() const { return kVoices; }
int getFirstChannel();
+ int getLastChannel();
void setVolume(byte volume);
int getVolume();
void setReverb(byte reverb);
@@ -328,12 +329,19 @@ void MidiPlayer_Midi::send(uint32 b) {
}
// We return 1 for mt32, because if we remap channels to 0 for mt32, those won't get played at all
+// NOTE: SSCI uses channels 1 through 8 for General MIDI as well, in the drivers I checked
int MidiPlayer_Midi::getFirstChannel() {
if (_isMt32)
return 1;
return 0;
}
+int MidiPlayer_Midi::getLastChannel() {
+ if (_isMt32)
+ return 8;
+ return 15;
+}
+
void MidiPlayer_Midi::setVolume(byte volume) {
_masterVolume = volume;
diff --git a/engines/sci/sound/drivers/mididriver.h b/engines/sci/sound/drivers/mididriver.h
index 2db6f25c70..0e38cc696c 100644
--- a/engines/sci/sound/drivers/mididriver.h
+++ b/engines/sci/sound/drivers/mididriver.h
@@ -87,6 +87,7 @@ public:
virtual byte getPlayId() = 0;
virtual int getPolyphony() const = 0;
virtual int getFirstChannel() { return 0; }
+ virtual int getLastChannel() { return 15; }
virtual void setVolume(byte volume) {
if(_driver)