[Scummvm-cvs-logs] SF.net SVN: scummvm:[41132] scummvm/trunk/engines/scumm/he/sound_he.cpp
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Wed Jun 3 02:55:36 CEST 2009
Revision: 41132
http://scummvm.svn.sourceforge.net/scummvm/?rev=41132&view=rev
Author: Kirben
Date: 2009-06-03 00:55:36 +0000 (Wed, 03 Jun 2009)
Log Message:
-----------
Correct sound timer and disable sound offsets, in later HE games.
Modified Paths:
--------------
scummvm/trunk/engines/scumm/he/sound_he.cpp
Modified: scummvm/trunk/engines/scumm/he/sound_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/sound_he.cpp 2009-06-03 00:31:50 UTC (rev 41131)
+++ scummvm/trunk/engines/scumm/he/sound_he.cpp 2009-06-03 00:55:36 UTC (rev 41132)
@@ -619,6 +619,9 @@
assert(heOffset >= 0 && heOffset < size);
+ // FIXME: Disabled sound offsets, due to asserts been triggered
+ heOffset = 0;
+
_vm->setHETimer(heChannel + 4);
_heChannel[heChannel].sound = soundID;
_heChannel[heChannel].priority = priority;
@@ -638,14 +641,14 @@
if (compType == 17) {
Audio::AudioStream *voxStream = Audio::makeADPCMStream(&stream, false, size, Audio::kADPCMMSIma, rate, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1, blockAlign);
- if (_heChannel[heChannel].timer)
- _heChannel[heChannel].timer = size * 1000 / rate;
-
sound = (char *)malloc(size * 4);
size = voxStream->readBuffer((int16*)sound, size * 2);
size *= 2; // 16bits.
delete voxStream;
+ if (_heChannel[heChannel].timer)
+ _heChannel[heChannel].timer = size * 1000 / rate;
+
flags |= Audio::Mixer::FLAG_AUTOFREE;
_mixer->playRaw(type, &_heSoundChannels[heChannel], sound + heOffset, size - heOffset, rate, flags, soundID);
} else {
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