[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.347,1.348
Travis Howell
kirben at users.sourceforge.net
Tue Jul 13 21:55:01 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4783/scumm
Modified Files:
sound.cpp
Log Message:
Fix speech in HE games.
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.347
retrieving revision 1.348
diff -u -d -r1.347 -r1.348
--- sound.cpp 13 Jul 2004 05:02:27 -0000 1.347
+++ sound.cpp 14 Jul 2004 04:54:06 -0000 1.348
@@ -597,16 +597,19 @@
return;
}
- // FIXME hack until more is known
- // the size of the data after the sample isn't known
- // 64 is just a guess
if (_vm->_features & GF_HUMONGOUS) {
- // SKIP TLKB (8) TALK (8) HSHD (24) and SDAT (8)
_sfxMode |= mode;
- _sfxFile->seek(offset + 48, SEEK_SET);
- sound = (byte *)malloc(b - 64);
- _sfxFile->read(sound, b - 64);
- _vm->_mixer->playRaw(handle, sound, b - 64, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
+
+ // SKIP TALK (8) HSHD (14)
+ _sfxFile->seek(offset + 22, SEEK_SET);
+ int rate = _sfxFile->readUint16LE();
+ // SKIP HSHD (8) and SDAT (8)
+ _sfxFile->seek(+16, SEEK_CUR);
+
+ size = b - 40;
+ sound = (byte *)malloc(size);
+ _sfxFile->read(sound, size);
+ _vm->_mixer->playRaw(handle, sound, size, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
return;
}
@@ -711,7 +714,6 @@
} else if (sound == -1 || sound == 10000 || sound == _currentMusic) {
// getSoundStatus(), with a -1, will return the
// ID number of the first active music it finds.
- // TODO handle MRAW (pcm music) in humongous games
if (_currentMusic)
return (_musicChannelHandle.isActive()) ? _currentMusic : 0;
else
More information about the Scummvm-git-logs
mailing list