From 97abfc9181e0689aada9ee97cde5899e6b28c366 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 28 Mar 2009 10:06:43 +0000 Subject: Add sound effects support for Amiga demo of BRA. svn-id: r39717 --- engines/parallaction/sound_br.cpp | 14 ++++++++++++-- 1 file 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; } -- cgit v1.2.3