diff options
author | Gregory Montoir | 2007-05-20 11:50:06 +0000 |
---|---|---|
committer | Gregory Montoir | 2007-05-20 11:50:06 +0000 |
commit | e0159324cce0b6ad354c8eeff0484431d52b4b00 (patch) | |
tree | 456cd6f9cf077d88e1ac87f6e25584bff3a78269 /engines/cine/sound.cpp | |
parent | b37c83448aaeb9a88a6f88fb58d9dda6634ef5f4 (diff) | |
download | scummvm-rg350-e0159324cce0b6ad354c8eeff0484431d52b4b00.tar.gz scummvm-rg350-e0159324cce0b6ad354c8eeff0484431d52b4b00.tar.bz2 scummvm-rg350-e0159324cce0b6ad354c8eeff0484431d52b4b00.zip |
some fixes for the music in Amiga OS Demo
svn-id: r26886
Diffstat (limited to 'engines/cine/sound.cpp')
-rw-r--r-- | engines/cine/sound.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp index 9a8d073c51..a17433f176 100644 --- a/engines/cine/sound.cpp +++ b/engines/cine/sound.cpp @@ -777,9 +777,21 @@ PaulaSound::~PaulaSound() { } void PaulaSound::loadMusic(const char *name) { - Common::File f; - if (f.open(name)) { - _moduleStream = Audio::makeSoundFxStream(&f, _mixer->getOutputRate()); + if (_vm->getGameType() == GType_FW) { + // look for separate files + Common::File f; + if (f.open(name)) { + _moduleStream = Audio::makeSoundFxStream(&f, 0, _mixer->getOutputRate()); + } + } else { + // look in bundle files + uint32 size; + byte *buf = readBundleSoundFile(name, &size); + if (buf) { + Common::MemoryReadStream s(buf, size); + _moduleStream = Audio::makeSoundFxStream(&s, readBundleSoundFile, _mixer->getOutputRate()); + free(buf); + } } } |