diff options
author | Walter van Niftrik | 2010-09-09 18:26:16 +0000 |
---|---|---|
committer | Walter van Niftrik | 2010-09-09 18:26:16 +0000 |
commit | 5eb0314e4cc94291f4ffb62cd2c7784ff1e26748 (patch) | |
tree | 523375883bcaed1043201dad8fa4acb57119dd29 /engines/sci/sound | |
parent | 30080c7e070aa06fa1fb795db90392d85351a62c (diff) | |
download | scummvm-rg350-5eb0314e4cc94291f4ffb62cd2c7784ff1e26748.tar.gz scummvm-rg350-5eb0314e4cc94291f4ffb62cd2c7784ff1e26748.tar.bz2 scummvm-rg350-5eb0314e4cc94291f4ffb62cd2c7784ff1e26748.zip |
SCI: Fix last MIDI channel number for adlib driver
svn-id: r52662
Diffstat (limited to 'engines/sci/sound')
-rw-r--r-- | engines/sci/sound/drivers/adlib.cpp | 4 | ||||
-rw-r--r-- | engines/sci/sound/music.cpp | 1 | ||||
-rw-r--r-- | engines/sci/sound/music.h | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/engines/sci/sound/drivers/adlib.cpp b/engines/sci/sound/drivers/adlib.cpp index 6d74151f1e..89ea426efc 100644 --- a/engines/sci/sound/drivers/adlib.cpp +++ b/engines/sci/sound/drivers/adlib.cpp @@ -73,6 +73,8 @@ public: bool loadResource(const byte *data, uint size); virtual uint32 property(int prop, uint32 param); + bool useRhythmChannel() { return _rhythmKeyMap != NULL; } + private: enum ChannelID { kLeftChannel = 1, @@ -177,6 +179,8 @@ public: void setVolume(byte volume) { static_cast<MidiDriver_AdLib *>(_driver)->setVolume(volume); } void playSwitch(bool play) { static_cast<MidiDriver_AdLib *>(_driver)->playSwitch(play); } void loadInstrument(int idx, byte *data); + + int getLastChannel() { return (static_cast<MidiDriver_AdLib *>(_driver)->useRhythmChannel() ? 8 : 15); } }; static const byte registerOffset[MidiDriver_AdLib::kVoices] = { diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 1e0fe1e103..61abc8f29f 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -102,6 +102,7 @@ void SciMusic::init() { // Find out what the first possible channel is (used, when doing channel // remapping). _driverFirstChannel = _pMidiDrv->getFirstChannel(); + _driverLastChannel = _pMidiDrv->getLastChannel(); } void SciMusic::miditimerCallback(void *p) { diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h index 21d930fc9a..9fcbb9346d 100644 --- a/engines/sci/sound/music.h +++ b/engines/sci/sound/music.h @@ -223,6 +223,7 @@ private: MusicType _musicType; int _driverFirstChannel; + int _driverLastChannel; }; } // End of namespace Sci |