aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2009-03-28 10:06:43 +0000
committerTravis Howell2009-03-28 10:06:43 +0000
commit97abfc9181e0689aada9ee97cde5899e6b28c366 (patch)
tree687f0b6a989e2882be2717c7e992fe1161c7545d
parent49791796219a0dbd0638b84b79ea6ee53f95cc79 (diff)
downloadscummvm-rg350-97abfc9181e0689aada9ee97cde5899e6b28c366.tar.gz
scummvm-rg350-97abfc9181e0689aada9ee97cde5899e6b28c366.tar.bz2
scummvm-rg350-97abfc9181e0689aada9ee97cde5899e6b28c366.zip
Add sound effects support for Amiga demo of BRA.
svn-id: r39717
-rw-r--r--engines/parallaction/sound_br.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/parallaction/sound_br.cpp b/engines/parallaction/sound_br.cpp
index 195a0f8a08..a9b734f69b 100644
--- a/engines/parallaction/sound_br.cpp
+++ b/engines/parallaction/sound_br.cpp
@@ -462,8 +462,18 @@ AmigaSoundMan_br::~AmigaSoundMan_br() {
void AmigaSoundMan_br::loadChannelData(const char *filename, Channel *ch) {
Common::SeekableReadStream *stream = _vm->_disk->loadSound(filename);
- Audio::A8SVXDecoder decoder(*stream, ch->header, ch->data, ch->dataSize);
- decoder.decode();
+ if (_vm->getFeatures() & GF_DEMO) {
+ ch->dataSize = stream->size();
+ ch->data = (int8*)malloc(ch->dataSize);
+ if (stream->read(ch->data, ch->dataSize) != ch->dataSize)
+ error("DosSoundMan_br::loadChannelData: Read failed");
+
+ // TODO: Confirm sound rate
+ ch->header.samplesPerSec = 11025;
+ } else {
+ Audio::A8SVXDecoder decoder(*stream, ch->header, ch->data, ch->dataSize);
+ decoder.decode();
+ }
ch->dispose = true;
delete stream;
}