From e0159324cce0b6ad354c8eeff0484431d52b4b00 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Sun, 20 May 2007 11:50:06 +0000 Subject: some fixes for the music in Amiga OS Demo svn-id: r26886 --- engines/cine/sound.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'engines/cine/sound.cpp') 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); + } } } -- cgit v1.2.3