[Scummvm-cvs-logs] SF.net SVN: scummvm:[39717] scummvm/trunk/engines/parallaction/sound_br.cpp
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Sat Mar 28 11:06:44 CET 2009
Revision: 39717
http://scummvm.svn.sourceforge.net/scummvm/?rev=39717&view=rev
Author: Kirben
Date: 2009-03-28 10:06:43 +0000 (Sat, 28 Mar 2009)
Log Message:
-----------
Add sound effects support for Amiga demo of BRA.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/sound_br.cpp
Modified: scummvm/trunk/engines/parallaction/sound_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/sound_br.cpp 2009-03-28 09:56:39 UTC (rev 39716)
+++ scummvm/trunk/engines/parallaction/sound_br.cpp 2009-03-28 10:06:43 UTC (rev 39717)
@@ -462,8 +462,18 @@
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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list