diff options
| author | Robert Göffringmann | 2003-07-05 03:05:54 +0000 | 
|---|---|---|
| committer | Robert Göffringmann | 2003-07-05 03:05:54 +0000 | 
| commit | 9f277f1ed001e5f36d46e1a4d0465941e7ed8680 (patch) | |
| tree | b68b5ffbe209180538bb485f2922b0e986ebdc0b | |
| parent | 2abe6a9126de98d0c78e5d222ae36aa680e0ad9f (diff) | |
| download | scummvm-rg350-9f277f1ed001e5f36d46e1a4d0465941e7ed8680.tar.gz scummvm-rg350-9f277f1ed001e5f36d46e1a4d0465941e7ed8680.tar.bz2 scummvm-rg350-9f277f1ed001e5f36d46e1a4d0465941e7ed8680.zip  | |
hope this fixes problems about cut-off speech.
svn-id: r8759
| -rw-r--r-- | sky/sound.cpp | 8 | ||||
| -rw-r--r-- | sky/sound.h | 2 | 
2 files changed, 5 insertions, 5 deletions
diff --git a/sky/sound.cpp b/sky/sound.cpp index 0d51390fe4..8df04d4243 100644 --- a/sky/sound.cpp +++ b/sky/sound.cpp @@ -1021,7 +1021,7 @@ SkySound::SkySound(SoundMixer *mixer, SkyDisk *pDisk) {  	_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::loadSection(uint8 pSection) {  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 @@ bool SkySound::startSpeech(uint16 textNum) {  	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;  } diff --git a/sky/sound.h b/sky/sound.h index 8a64655589..36e6a581b5 100644 --- a/sky/sound.h +++ b/sky/sound.h @@ -72,7 +72,7 @@ private:  	uint16 _sfxBaseOfs;  	uint8 *_soundData;  	uint8 *_sampleRates, *_sfxInfo; -	int _slot0, _slot1; +	int _slot0, _slot1, _spSlot;  	static uint16 _speechConvertTable[8];  	static SfxQueue _sfxQueue[MAX_QUEUED_FX];  | 
