[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.500,1.501 sound_he.cpp,2.16,2.17
kirben
kirben at users.sourceforge.net
Tue Jan 17 22:07:02 CET 2006
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scumm-md5.h,2.107.2.12,2.107.2.13 scumm.cpp,1.603.2.33,1.603.2.34 scumm.h,1.647.2.12,1.647.2.13 string.cpp,1.304.2.3,1.304.2.4
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.236.2.7,1.236.2.8 sound.cpp,1.479.2.8,1.479.2.9 sound_he.cpp,2.10.2.3,2.10.2.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18019/scumm
Modified Files:
sound.cpp sound_he.cpp
Log Message:
Sound queue order is different in HE72+ games.
Fixes wrong music been played in some locations.
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.500
retrieving revision 1.501
diff -u -d -r1.500 -r1.501
--- sound.cpp 15 Jan 2006 11:19:15 -0000 1.500
+++ sound.cpp 18 Jan 2006 06:06:14 -0000 1.501
@@ -142,17 +142,33 @@
int snd, heOffset, heChannel, heFlags;
int data[16];
- while (_soundQue2Pos) {
- _soundQue2Pos--;
- snd = _soundQue2[_soundQue2Pos].sound;
- heOffset = _soundQue2[_soundQue2Pos].offset;
- heChannel = _soundQue2[_soundQue2Pos].channel;
- heFlags = _soundQue2[_soundQue2Pos].flags;
- if (snd) {
- if (_vm->_heversion>= 60)
- playHESound(snd, heOffset, heChannel, heFlags);
- else
- playSound(snd);
+ if (_vm->_heversion >= 72) {
+ for (i = 0; i <_soundQue2Pos; i++) {
+ snd = _soundQue2[i].sound;
+ heOffset = _soundQue2[i].offset;
+ heChannel = _soundQue2[i].channel;
+ heFlags = _soundQue2[i].flags;
+ if (snd) {
+ if (_vm->_heversion>= 60)
+ playHESound(snd, heOffset, heChannel, heFlags);
+ else
+ playSound(snd);
+ }
+ }
+ _soundQue2Pos = 0;
+ } else {
+ while (_soundQue2Pos) {
+ _soundQue2Pos--;
+ snd = _soundQue2[_soundQue2Pos].sound;
+ heOffset = _soundQue2[_soundQue2Pos].offset;
+ heChannel = _soundQue2[_soundQue2Pos].channel;
+ heFlags = _soundQue2[_soundQue2Pos].flags;
+ if (snd) {
+ if (_vm->_heversion>= 60)
+ playHESound(snd, heOffset, heChannel, heFlags);
+ else
+ playSound(snd);
+ }
}
}
Index: sound_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound_he.cpp,v
retrieving revision 2.16
retrieving revision 2.17
diff -u -d -r2.16 -r2.17
--- sound_he.cpp 16 Jan 2006 10:11:52 -0000 2.16
+++ sound_he.cpp 18 Jan 2006 06:06:14 -0000 2.17
@@ -416,7 +416,7 @@
else if (READ_UINT32(ptr) == MKID('DIGI') || READ_UINT32(ptr) == MKID('TALK')) {
byte *sndPtr = ptr;
- priority = *(ptr + 18);
+ priority = (soundID > _vm->_numSounds) ? 255 : *(ptr + 18);
rate = READ_LE_UINT16(ptr + 22);
ptr += 8 + READ_BE_UINT32(ptr + 12);
@@ -480,7 +480,7 @@
_currentMusic = soundID;
_vm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID);
}
- else {
+ else if (READ_UINT32(ptr) == MKID('MIDI')) {
if (_vm->_musicEngine) {
_vm->_musicEngine->startSound(soundID);
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scumm-md5.h,2.107.2.12,2.107.2.13 scumm.cpp,1.603.2.33,1.603.2.34 scumm.h,1.647.2.12,1.647.2.13 string.cpp,1.304.2.3,1.304.2.4
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.236.2.7,1.236.2.8 sound.cpp,1.479.2.8,1.479.2.9 sound_he.cpp,2.10.2.3,2.10.2.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list