diff options
author | Torbjörn Andersson | 2007-12-16 14:46:48 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2007-12-16 14:46:48 +0000 |
commit | 943ab421a47d543002d1e503a893ec68526c1672 (patch) | |
tree | 3df162bd569ccf1e206c573cd8dc668918854b7f /engines | |
parent | 0b74448ded1acd0e52cf61622ac44cb782894bb1 (diff) | |
download | scummvm-rg350-943ab421a47d543002d1e503a893ec68526c1672.tar.gz scummvm-rg350-943ab421a47d543002d1e503a893ec68526c1672.tar.bz2 scummvm-rg350-943ab421a47d543002d1e503a893ec68526c1672.zip |
The _nativeMT32 in MidiMusic was never initialised. Rather than storing it in
two different classes, use the value in SoundManager instead. As a consequence
the engine now remaps the instruments from MT-32 to General MIDI for me, since
isRoland() is true and hasNativeMT32() is false. Earlier, it didn't since the
uninitialised _nativeMT32 happened to be true for me.
svn-id: r29878
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lure/sound.cpp | 6 | ||||
-rw-r--r-- | engines/lure/sound.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/engines/lure/sound.cpp b/engines/lure/sound.cpp index 2f6a0571a7..0cb0291675 100644 --- a/engines/lure/sound.cpp +++ b/engines/lure/sound.cpp @@ -693,8 +693,10 @@ void MidiMusic::send(uint32 b) { _channels[channel].volume = volume; volume = volume * _volume / 255; b = (b & 0xFF00FFFF) | (volume << 16); - } else if ((b & 0xF0) == 0xC0 && !_nativeMT32) { - b = (b & 0xFFFF00FF) | MidiDriver::_mt32ToGm[(b >> 8) & 0xFF] << 8; + } else if ((b & 0xF0) == 0xC0) { + if (Sound.isRoland() && !Sound.hasNativeMT32()) { + b = (b & 0xFFFF00FF) | MidiDriver::_mt32ToGm[(b >> 8) & 0xFF] << 8; + } } else if ((b & 0xFFF0) == 0x007BB0) { // No implementation diff --git a/engines/lure/sound.h b/engines/lure/sound.h index 0520e8ca09..9d82f91223 100644 --- a/engines/lure/sound.h +++ b/engines/lure/sound.h @@ -57,7 +57,6 @@ private: MidiParser *_parser; ChannelEntry *_channels; bool _isPlaying; - bool _nativeMT32; void queueUpdatePos(); uint8 randomQueuePos(); @@ -73,7 +72,6 @@ public: void setVolume(int volume); int getVolume() { return _volume; } - void hasNativeMT32(bool b) { _nativeMT32 = b; } void playSong(uint16 songNum); void stopSong() { stopMusic(); } void playMusic(); @@ -151,6 +149,7 @@ public: void pause() { _paused = true; } void resume() { _paused = false; } bool getPaused() { return _paused; } + bool hasNativeMT32() { return _nativeMT32; } bool isRoland() { return _isRoland; } // The following methods implement the external sound player module |