aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/sound.cpp
diff options
context:
space:
mode:
authorGregory Montoir2007-05-20 11:50:06 +0000
committerGregory Montoir2007-05-20 11:50:06 +0000
commite0159324cce0b6ad354c8eeff0484431d52b4b00 (patch)
tree456cd6f9cf077d88e1ac87f6e25584bff3a78269 /engines/cine/sound.cpp
parentb37c83448aaeb9a88a6f88fb58d9dda6634ef5f4 (diff)
downloadscummvm-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.cpp18
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);
+ }
}
}