aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2009-08-08 11:42:29 +0000
committerJohannes Schickel2009-08-08 11:42:29 +0000
commit19c27b04b6c919336353e788cea1850aad2a0a9d (patch)
treee348bd94136e2674fa0342c5f3d8c4910d387e91 /engines
parent14574b0d81fb9711d9601f9beb5ecba06c599174 (diff)
downloadscummvm-rg350-19c27b04b6c919336353e788cea1850aad2a0a9d.tar.gz
scummvm-rg350-19c27b04b6c919336353e788cea1850aad2a0a9d.tar.bz2
scummvm-rg350-19c27b04b6c919336353e788cea1850aad2a0a9d.zip
Add workaround for bug #2820054 "DW1: No intro music at first start on Wii", which actually happened on all systems, when using the multilanguage version.
svn-id: r43119
Diffstat (limited to 'engines')
-rw-r--r--engines/tinsel/music.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index 06b70874dc..0e4734851a 100644
--- a/engines/tinsel/music.cpp
+++ b/engines/tinsel/music.cpp
@@ -256,6 +256,22 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) {
midiStream.close();
+ // WORKAROUND for bug #2820054 "DW1: No intro music at first start on Wii",
+ // which actually affects all ports, since it's specific to the multi language
+ // version.
+ //
+ // The multilanguage version does not seem to set the channel volume at all for
+ // the intro track, thus we need to do that here. We only initialize the
+ // channels used in that sequence. And we are using 127 as default channel volume.
+ if (_vm->getGameID() == GID_DW1 && dwFileOffset == 38888 &&
+ (_vm->getFeatures() & (GF_USE_3FLAGS | GF_USE_4FLAGS | GF_USE_5FLAGS))) {
+ _vm->_midiMusic->send(0x7F07B0 | 3);
+ _vm->_midiMusic->send(0x7F07B0 | 5);
+ _vm->_midiMusic->send(0x7F07B0 | 8);
+ _vm->_midiMusic->send(0x7F07B0 | 10);
+ _vm->_midiMusic->send(0x7F07B0 | 13);
+ }
+
_vm->_midiMusic->playXMIDI(midiBuffer.pDat, dwSeqLen, bLoop);
// Store the length
@@ -320,10 +336,10 @@ void SetMidiVolume(int vol) {
_vm->_midiMusic->setVolume(vol);
} else if (vol != 0 && priorVolMusic == 0) {
// Perhaps restart last midi sequence
- if (currentLoop) {
+ if (currentLoop)
PlayMidiSequence(currentMidi, true);
+
_vm->_midiMusic->setVolume(vol);
- }
} else if (vol != 0 && priorVolMusic != 0) {
// Alter current volume
_vm->_midiMusic->setVolume(vol);
@@ -377,6 +393,7 @@ void DeleteMidiBuffer() {
MidiMusicPlayer::MidiMusicPlayer(MidiDriver *driver) : _parser(0), _driver(driver), _looping(false), _isPlaying(false) {
memset(_channel, 0, sizeof(_channel));
+ memset(_channelVolume, 0, sizeof(_channelVolume));
_masterVolume = 0;
this->open();
_xmidiParser = MidiParser::createParser_XMIDI();