diff options
author | Torbjörn Andersson | 2013-01-27 18:18:04 +0100 |
---|---|---|
committer | Torbjörn Andersson | 2013-01-27 18:18:04 +0100 |
commit | a50c05f7d0b98a1777f7b97af54bb2c842de0318 (patch) | |
tree | 3f0b1dfd362721cc8a5263abe3690cfda319d93c /engines | |
parent | 9d1d5a09c4a1fb2ca827755e197ea7726eaa39ab (diff) | |
download | scummvm-rg350-a50c05f7d0b98a1777f7b97af54bb2c842de0318.tar.gz scummvm-rg350-a50c05f7d0b98a1777f7b97af54bb2c842de0318.tar.bz2 scummvm-rg350-a50c05f7d0b98a1777f7b97af54bb2c842de0318.zip |
HOPKINS: Work around broken cadavre.mod in OS/2 and BeOS versions
A large part of cadavre.mod is broken. No new notes play, and only
the old background sounds remain. It's possible, perhaps even
probable, that the original MOD player didn't have this problem,
but all standalone players I've tried do, so I'm assuming it's the
file that's broken. We work around it by changing the length of
the song after it's been loaded to only include the good parts.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/sound.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index d24c3e10b2..46bdb1e841 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -29,6 +29,7 @@ #include "hopkins/globals.h" #include "hopkins/hopkins.h" #include "audio/audiostream.h" +#include "audio/mods/module.h" #include "audio/mods/protracker.h" #include "audio/decoders/raw.h" @@ -413,7 +414,18 @@ void SoundManager::loadMusic(const Common::String &file) { if (!f.open(filename)) error("Error opening file %s", filename.c_str()); - Audio::AudioStream *modStream = Audio::makeProtrackerStream(&f); + Modules::Module *module; + Audio::AudioStream *modStream = Audio::makeProtrackerStream(&f, 0, 44100, true, &module); + + // WORKAROUND: This song is played at the empty lot where the + // bank robbers have left the helicopter. The MOD file appears + // to be slightly broken. Almost half of it is just the same + // noise repeating. We fix this by only playing the working + // part of it. The result is pretty close to the Windows music. + if (file.equalsIgnoreCase("cadavre")) { + module->songlen = 3; + } + _vm->_mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, modStream); } else { |