[Scummvm-cvs-logs] CVS: scummvm/sky sound.cpp,1.21,1.22 sound.h,1.10,1.11
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Fri Jul 4 20:06:34 CEST 2003
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv14651/sky
Modified Files:
sound.cpp sound.h
Log Message:
hope this fixes problems about cut-off speech.
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- sound.cpp 4 Jul 2003 20:17:26 -0000 1.21
+++ sound.cpp 5 Jul 2003 03:05:54 -0000 1.22
@@ -1021,7 +1021,7 @@
_bgSoundHandle = 0;
_ingameSpeech = 0;
_ingameSound0 = _ingameSound1 = 0;
- _slot0 = _slot1 = -1;
+ _spSlot = _slot0 = _slot1 = -1;
_saveSounds[0] = _saveSounds[1] = 0xFFFF;
}
@@ -1075,12 +1075,12 @@
void SkySound::playSound(uint16 sound, uint16 volume, uint8 channel) {
if (channel == 0) {
- if (_slot0 >= 0) {
+ if ((_slot0 >= 0) && ((_slot0 != _spSlot) || (!_ingameSpeech))) {
_mixer->stop(_slot0);
_slot0 = -1;
}
} else {
- if (_slot1 >= 0) {
+ if ((_slot1 >= 0) && ((_slot1 != _spSlot) || (!_ingameSpeech))){
_mixer->stop(_slot1);
_slot1 = -1;
}
@@ -1229,6 +1229,6 @@
free(speechData);
- _mixer->playRaw(&_ingameSpeech, playBuffer, speechSize - 64, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
+ _spSlot = _mixer->playRaw(&_ingameSpeech, playBuffer, speechSize - 64, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
return true;
}
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- sound.h 4 Jul 2003 20:14:11 -0000 1.10
+++ sound.h 5 Jul 2003 03:05:54 -0000 1.11
@@ -72,7 +72,7 @@
uint16 _sfxBaseOfs;
uint8 *_soundData;
uint8 *_sampleRates, *_sfxInfo;
- int _slot0, _slot1;
+ int _slot0, _slot1, _spSlot;
static uint16 _speechConvertTable[8];
static SfxQueue _sfxQueue[MAX_QUEUED_FX];
More information about the Scummvm-git-logs
mailing list