[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.493,1.494 sound_he.cpp,2.1,2.2
kirben
kirben at users.sourceforge.net
Wed Jan 4 23:51:01 CET 2006
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5587/scumm
Modified Files:
sound.cpp sound_he.cpp
Log Message:
Enable sound priority in HE games.
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.493
retrieving revision 1.494
diff -u -d -r1.493 -r1.494
--- sound.cpp 5 Jan 2006 07:06:47 -0000 1.493
+++ sound.cpp 5 Jan 2006 07:49:49 -0000 1.494
@@ -29,7 +29,6 @@
#include "scumm/util.h"
#include "common/config-manager.h"
-#include "common/system.h"
#include "common/timer.h"
#include "common/util.h"
Index: sound_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound_he.cpp,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -d -r2.1 -r2.2
--- sound_he.cpp 5 Jan 2006 07:06:47 -0000 2.1
+++ sound_he.cpp 5 Jan 2006 07:49:52 -0000 2.2
@@ -22,12 +22,12 @@
#include "common/stdafx.h"
#include "scumm/actor.h"
+#include "scumm/imuse.h"
#include "scumm/scumm.h"
#include "scumm/sound.h"
#include "scumm/util.h"
#include "common/config-manager.h"
-#include "common/system.h"
#include "common/timer.h"
#include "common/util.h"
@@ -96,7 +96,7 @@
}
if (chan != -1) {
- //debug(1, "getSoundVar: sound %d var %d result %d\n", sound, var, _heChannel[chan].soundVars[var]);
+ debug(1, "getSoundVar: sound %d var %d result %d\n", sound, var, _heChannel[chan].soundVars[var]);
return _heChannel[chan].soundVars[var];
} else {
return 0;
@@ -411,8 +411,11 @@
ptr += 8 + READ_BE_UINT32(ptr + 12);
}
- //if (_vm->_mixer->isSoundHandleActive(_heSoundChannels[heChannel]) && _heChannel[heChannel].priority > priority)
- // return;
+ if (_vm->_mixer->isSoundHandleActive(_heSoundChannels[heChannel])) {
+ int curSnd = _heChannel[heChannel].sound;
+ if (curSnd != 0 && curSnd != 1 && soundID != 1 && _heChannel[heChannel].priority > priority)
+ return;
+ }
int codeOffs = -1;
if (READ_UINT32(ptr) == MKID('SBNG')) {
@@ -442,7 +445,7 @@
// Allocate a sound buffer, copy the data into it, and play
sound = (char *)malloc(size);
memcpy(sound, ptr + heOffset + 8, size);
- //_vm->_mixer->stopHandle(_heSoundChannels[heChannel]);
+ _vm->_mixer->stopHandle(_heSoundChannels[heChannel]);
_vm->_mixer->playRaw(&_heSoundChannels[heChannel], sound, size, rate, flags, soundID);
_vm->setHETimer(heChannel + 4);
@@ -471,9 +474,9 @@
_vm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID);
}
else {
- //if (_vm->_musicEngine) {
- // _vm->_musicEngine->startSound(soundID);
- //}
+ if (_vm->_musicEngine) {
+ _vm->_musicEngine->startSound(soundID);
+ }
}
free(mallocedPtr);
More information about the Scummvm-git-logs
mailing list