pulled out arisme's recent changes to pauseMode, they are not correct as they break pause mode for all systems that use real MIDI drivers (see bug #584684). If you need a mute music mode, then add an according function to iMUSE/mixer but don't abuse pause mode, please
svn-id: r4615
This commit is contained in:
parent
72cfdcf415
commit
1c4167f080
3 changed files with 18 additions and 22 deletions
|
@ -536,11 +536,11 @@ void Scumm::pauseSounds(bool pause)
|
||||||
{
|
{
|
||||||
/* Arisme : do not pause iMuse as this will disable synch events */
|
/* Arisme : do not pause iMuse as this will disable synch events */
|
||||||
/* the sound is really "paused" in the mixer */
|
/* the sound is really "paused" in the mixer */
|
||||||
/*
|
|
||||||
IMuse *se = _imuse;
|
IMuse *se = _imuse;
|
||||||
if (se)
|
if (se)
|
||||||
se->pause(pause);
|
se->pause(pause);
|
||||||
*/
|
|
||||||
_soundsPaused = pause;
|
_soundsPaused = pause;
|
||||||
_mixer->pause(pause);
|
_mixer->pause(pause);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,6 @@ static const byte mt32_to_gmidi[128] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Put IMUSE specific classes here, instead of in a .h file
|
/* Put IMUSE specific classes here, instead of in a .h file
|
||||||
* they will only be used from this file, so it will reduce
|
* they will only be used from this file, so it will reduce
|
||||||
* compile time */
|
* compile time */
|
||||||
|
@ -1270,8 +1269,7 @@ int IMuseInternal::set_music_volume(uint vol)
|
||||||
{
|
{
|
||||||
if (vol > 100)
|
if (vol > 100)
|
||||||
vol = 100;
|
vol = 100;
|
||||||
|
else if (vol < 1)
|
||||||
if (vol < 1)
|
|
||||||
vol = 1;
|
vol = 1;
|
||||||
|
|
||||||
_music_volume = vol;
|
_music_volume = vol;
|
||||||
|
@ -1288,7 +1286,6 @@ int IMuseInternal::set_master_volume(uint vol)
|
||||||
vol = vol / (100 / _music_volume);
|
vol = vol / (100 / _music_volume);
|
||||||
|
|
||||||
_master_volume = vol;
|
_master_volume = vol;
|
||||||
// _s->_sound_volume_master = vol;
|
|
||||||
for (i = 0; i != 8; i++)
|
for (i = 0; i != 8; i++)
|
||||||
_channel_volume_eff[i] = (_channel_volume[i] + 1) * vol >> 7;
|
_channel_volume_eff[i] = (_channel_volume[i] + 1) * vol >> 7;
|
||||||
update_volumes();
|
update_volumes();
|
||||||
|
@ -1747,6 +1744,7 @@ bool Player::start_sound(int sound)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_mt32emulate = _se->isMT32(sound);
|
_mt32emulate = _se->isMT32(sound);
|
||||||
_parts = NULL;
|
_parts = NULL;
|
||||||
_active = true;
|
_active = true;
|
||||||
|
|
|
@ -109,6 +109,10 @@ int SoundMixer::play_mp3_cdtrack(PlayingSoundHandle *handle, FILE * file, mad_ti
|
||||||
|
|
||||||
void SoundMixer::mix(int16 *buf, uint len)
|
void SoundMixer::mix(int16 *buf, uint len)
|
||||||
{
|
{
|
||||||
|
if (_paused) {
|
||||||
|
memset(buf, 0, 2 * len * sizeof(int16));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_premix_proc) {
|
if (_premix_proc) {
|
||||||
int i;
|
int i;
|
||||||
|
@ -117,16 +121,10 @@ void SoundMixer::mix(int16 *buf, uint len)
|
||||||
buf[2 * i] = buf[2 * i + 1] = buf[i];
|
buf[2 * i] = buf[2 * i + 1] = buf[i];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* no premixer available, zero the buf out */
|
// no premixer available, zero the buf out
|
||||||
memset(buf, 0, 2 * len * sizeof(int16));
|
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);
|
_syst->lock_mutex(_mutex);
|
||||||
/* now mix all channels */
|
/* now mix all channels */
|
||||||
for (int i = 0; i != NUM_CHANNELS; i++)
|
for (int i = 0; i != NUM_CHANNELS; i++)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue