aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-11-25 22:17:23 +0000
committerFilippos Karapetis2010-11-25 22:17:23 +0000
commit3a8648c4db69160e31e2d9b59f40e192a5060514 (patch)
tree6cc558bcab1672fa156cf5e6f729392b085b0819
parent11ac03b7aba61570f54eaf06984a818f881a6166 (diff)
downloadscummvm-rg350-3a8648c4db69160e31e2d9b59f40e192a5060514.tar.gz
scummvm-rg350-3a8648c4db69160e31e2d9b59f40e192a5060514.tar.bz2
scummvm-rg350-3a8648c4db69160e31e2d9b59f40e192a5060514.zip
SCI: Initialize reverb in the music driver correctly. Based on a patch by waltervn
svn-id: r54483
-rw-r--r--engines/sci/sound/drivers/midi.cpp4
-rw-r--r--engines/sci/sound/drivers/mididriver.h10
2 files changed, 7 insertions, 7 deletions
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 2b72310ad5..2627f0728c 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -69,7 +69,7 @@ public:
int getLastChannel() const;
void setVolume(byte volume);
int getVolume();
- void setReverb(byte reverb);
+ void setReverb(int8 reverb);
void playSwitch(bool play);
private:
@@ -383,7 +383,7 @@ int MidiPlayer_Midi::getVolume() {
return _masterVolume;
}
-void MidiPlayer_Midi::setReverb(byte reverb) {
+void MidiPlayer_Midi::setReverb(int8 reverb) {
assert(reverb < kReverbConfigNr);
_reverb = reverb;
diff --git a/engines/sci/sound/drivers/mididriver.h b/engines/sci/sound/drivers/mididriver.h
index 710bd98c97..dabe869a8f 100644
--- a/engines/sci/sound/drivers/mididriver.h
+++ b/engines/sci/sound/drivers/mididriver.h
@@ -79,10 +79,10 @@ enum {
class MidiPlayer : public MidiDriver {
protected:
MidiDriver *_driver;
- byte _reverb;
+ int8 _reverb;
public:
- MidiPlayer(SciVersion version) : _driver(0), _reverb(0), _version(version) { }
+ MidiPlayer(SciVersion version) : _driver(0), _reverb(-1), _version(version) { }
int open() {
ResourceManager *resMan = g_sci->getResMan(); // HACK
@@ -111,10 +111,10 @@ public:
return _driver ? _driver->property(MIDI_PROP_MASTER_VOLUME, 0xffff) : 0;
}
- // Returns the current reverb
- byte getReverb() const { return _reverb; }
+ // Returns the current reverb, or -1 when no reverb is active
+ int8 getReverb() const { return _reverb; }
// Sets the current reverb, used mainly in MT-32
- virtual void setReverb(byte reverb) { _reverb = reverb; }
+ virtual void setReverb(int8 reverb) { _reverb = reverb; }
virtual void playSwitch(bool play) {
if (!play) {