aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/sound.cpp
diff options
context:
space:
mode:
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);
+ }
}
}