diff options
author | Max Horn | 2002-07-22 12:44:57 +0000 |
---|---|---|
committer | Max Horn | 2002-07-22 12:44:57 +0000 |
commit | 1c4167f0809eb8f49da0b4e428ee01b1aa3387fe (patch) | |
tree | e3229806027bb188d50e13527e1a1b3ffc56c391 /sound/mixer.cpp | |
parent | 72cfdcf415b670f90d648e5053812a165e5e1c9c (diff) | |
download | scummvm-rg350-1c4167f0809eb8f49da0b4e428ee01b1aa3387fe.tar.gz scummvm-rg350-1c4167f0809eb8f49da0b4e428ee01b1aa3387fe.tar.bz2 scummvm-rg350-1c4167f0809eb8f49da0b4e428ee01b1aa3387fe.zip |
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
Diffstat (limited to 'sound/mixer.cpp')
-rw-r--r-- | sound/mixer.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp index e44b459ca4..9aaae1176c 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -109,7 +109,11 @@ 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); @@ -117,16 +121,10 @@ void SoundMixer::mix(int16 *buf, uint len) buf[2 * i] = buf[2 * i + 1] = buf[i]; } } else { - /* no premixer available, zero the buf out */ + // no premixer available, zero the buf out 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++) |