diff options
| author | Nicolas Bacca | 2002-07-20 07:57:22 +0000 | 
|---|---|---|
| committer | Nicolas Bacca | 2002-07-20 07:57:22 +0000 | 
| commit | 74041e21203bd0847d512d00f1bf01cee07b88dc (patch) | |
| tree | 993a3d0adb612879a37c8d31ec94e185cba2ff54 | |
| parent | 4e0747f46bbc4ef01875da4ba1cc801caffe4f08 (diff) | |
| download | scummvm-rg350-74041e21203bd0847d512d00f1bf01cee07b88dc.tar.gz scummvm-rg350-74041e21203bd0847d512d00f1bf01cee07b88dc.tar.bz2 scummvm-rg350-74041e21203bd0847d512d00f1bf01cee07b88dc.zip | |
Fixed Monkey Island 2 freeze when sound is paused
svn-id: r4608
| -rw-r--r-- | sound.cpp | 4 | ||||
| -rw-r--r-- | sound/mixer.cpp | 11 | 
2 files changed, 10 insertions, 5 deletions
| @@ -533,9 +533,13 @@ void Scumm::setupSound()  void Scumm::pauseSounds(bool pause)  { +	/* Arisme : do not pause iMuse as this will disable synch events */ +	/* the sound is really "paused" in the mixer					 */ +	/*  	IMuse *se = _imuse;  	if (se)  		se->pause(pause); +	*/  	_soundsPaused = pause;  	_mixer->pause(pause);	  } diff --git a/sound/mixer.cpp b/sound/mixer.cpp index e5677bbde0..73b793814c 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -110,11 +110,6 @@ int SoundMixer::play_mp3_cdtrack(PlayingSoundHandle *handle, FILE * file, mad_ti  void SoundMixer::mix(int16 *buf, uint len)  { -	if (_paused) { -		memset(buf, 0, 2 * len * sizeof(int16)); -		return; -	} -  	if (_premix_proc) {  		int i;  		_premix_proc(_premix_param, buf, len); @@ -126,6 +121,12 @@ void SoundMixer::mix(int16 *buf, uint len)  		memset(buf, 0, 2 * len * sizeof(int16));  	} +	/* Arisme : moved to let iMUSE generate the events */ +	if (_paused) { +		memset(buf, 0, 2 * len * sizeof(int16)); +		return; +	} +  	_syst->lock_mutex(_mutex);  	/* now mix all channels */  	for (int i = 0; i != NUM_CHANNELS; i++) | 
