[Scummvm-cvs-logs] CVS: scummvm/scumm script_v72he.cpp,2.321,2.322 sound.h,1.96,1.97 sound_he.cpp,2.10,2.11
kirben
kirben at users.sourceforge.net
Sat Jan 14 22:55:05 CET 2006
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm sound_he.cpp,NONE,2.10.2.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm script_v100he.cpp,2.186,2.187 script_v7he.cpp,2.175,2.176 scumm.cpp,1.689,1.690 scumm.h,1.665,1.666 sound.h,1.97,1.98 sound_he.cpp,2.11,2.12 vars.cpp,1.161,1.162
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7492/scumm
Modified Files:
script_v72he.cpp sound.h sound_he.cpp
Log Message:
Cleanup unused parts of HE sound code.
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.321
retrieving revision 2.322
diff -u -d -r2.321 -r2.322
--- script_v72he.cpp 5 Jan 2006 08:42:48 -0000 2.321
+++ script_v72he.cpp 15 Jan 2006 06:54:31 -0000 2.322
@@ -1135,7 +1135,6 @@
for (i = 0; i < k; ++i) {
a->setUserCondition(args[i] & 0x7F, args[i] & 0x80);
}
- debug(1,"o72_actorOps: case 21 (%d)", k);
break;
case 24: // HE 80+
k = pop();
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.h,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- sound.h 7 Jan 2006 23:53:38 -0000 1.96
+++ sound.h 15 Jan 2006 06:54:31 -0000 1.97
@@ -102,7 +102,6 @@
int priority;
int sbngBlock;
int soundVars[27];
- int timer;
} _heChannel[9];
public:
@@ -146,7 +145,6 @@
bool getHEMusicDetails(int id, int &musicOffs, int &musicSize);
int isSoundCodeUsed(int sound);
int getSoundPos(int sound);
- int getSoundPriority(int sound);
int getSoundVar(int sound, int var);
void setSoundVar(int sound, int var, int val);
void playHESound(int soundID, int heOffset, int heChannel, int heFlags);
Index: sound_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound_he.cpp,v
retrieving revision 2.10
retrieving revision 2.11
diff -u -d -r2.10 -r2.11
--- sound_he.cpp 15 Jan 2006 02:57:04 -0000 2.10
+++ sound_he.cpp 15 Jan 2006 06:54:31 -0000 2.11
@@ -72,20 +72,6 @@
}
}
-int Sound::getSoundPriority(int sound) {
- int chan = -1;
- for (int i = 0; i < ARRAYSIZE(_heChannel); i ++) {
- if (_heChannel[i].sound == sound)
- chan = i;
- }
-
- if (chan != -1) {
- return _heChannel[chan].priority;
- } else {
- return 0;
- }
-}
-
int Sound::getSoundVar(int sound, int var) {
if (_vm->_heversion >= 90 && var == 26) {
return isSoundCodeUsed(sound);
@@ -308,14 +294,15 @@
byte *ptr, *spoolPtr;
char *sound;
int size = -1;
- int rate;
+ int priority, rate;
byte flags = Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE;
if (heChannel == -1) {
- if (_vm->_heversion >= 95 && _vm->VAR(_vm->VAR_DEFAULT_SOUND_CHANNEL) != 0)
+ if (_vm->_heversion >= 95 && _vm->VAR(_vm->VAR_DEFAULT_SOUND_CHANNEL) != 0) {
heChannel = _vm->VAR(_vm->VAR_DEFAULT_SOUND_CHANNEL);
- else
+ } else {
heChannel = 1;
+ }
}
if (soundID > _vm->_numSounds) {
@@ -400,17 +387,17 @@
// Support for sound in Humongous Entertainment games
else if (READ_UINT32(ptr) == MKID('DIGI') || READ_UINT32(ptr) == MKID('TALK')) {
byte *sndPtr = ptr;
- int priority;
priority = *(ptr + 18);
rate = READ_LE_UINT16(ptr + 22);
ptr += 8 + READ_BE_UINT32(ptr + 12);
- if (_vm->_mixer->isSoundHandleActive(_heSoundChannels[heChannel])) {
+ // TODO
+ /* 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')) {
@@ -446,19 +433,19 @@
_vm->setHETimer(heChannel + 4);
_heChannel[heChannel].sound = soundID;
_heChannel[heChannel].priority = priority;
- _heChannel[heChannel].timer = 0;
- _heChannel[heChannel].sbngBlock = (codeOffs != 0) ? 1 : 0;
+ _heChannel[heChannel].sbngBlock = (codeOffs != -1) ? 1 : 0;
_heChannel[heChannel].codeOffs = codeOffs;
memset(_heChannel[heChannel].soundVars, 0, sizeof(_heChannel[heChannel].soundVars));
}
// Support for PCM music in 3DO versions of Humongous Entertainment games
else if (READ_UINT32(ptr) == MKID('MRAW')) {
+ priority = *(ptr + 18);
+ rate = READ_LE_UINT16(ptr + 22);
ptr += 8 + READ_BE_UINT32(ptr+12);
- if (READ_UINT32(ptr) != MKID('SDAT'))
- return;
+ assert(READ_UINT32(ptr) == MKID('SDAT'));
size = READ_BE_UINT32(ptr+4) - 8;
- rate = 22050;
+
flags = Audio::Mixer::FLAG_AUTOFREE;
// Allocate a sound buffer, copy the data into it, and play
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm sound_he.cpp,NONE,2.10.2.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm script_v100he.cpp,2.186,2.187 script_v7he.cpp,2.175,2.176 scumm.cpp,1.689,1.690 scumm.h,1.665,1.666 sound.h,1.97,1.98 sound_he.cpp,2.11,2.12 vars.cpp,1.161,1.162
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list