aboutsummaryrefslogtreecommitdiff
path: root/sound/mixer.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2003-08-09 19:19:27 +0000
committerRobert Göffringmann2003-08-09 19:19:27 +0000
commit7f7b0af613622825deb94af72093f19fda0fe68a (patch)
treeb8b58c16cbf8cbdb804a8bea4ad391c35710e963 /sound/mixer.cpp
parent129ae93ca6ae1a19d419b1e5893e97eb91716f20 (diff)
downloadscummvm-rg350-7f7b0af613622825deb94af72093f19fda0fe68a.tar.gz
scummvm-rg350-7f7b0af613622825deb94af72093f19fda0fe68a.tar.bz2
scummvm-rg350-7f7b0af613622825deb94af72093f19fda0fe68a.zip
added SoundMixer::pauseChannels for pausing SFX and keeping adlib music running (needed by BASS when menu bar drops down)
svn-id: r9607
Diffstat (limited to 'sound/mixer.cpp')
-rw-r--r--sound/mixer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index 40f59714ab..8d452b4431 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -121,6 +121,7 @@ SoundMixer::SoundMixer() {
_musicVolume = 0;
_paused = false;
+ _channelsPaused = false;
for (i = 0; i != NUM_CHANNELS; i++)
_channels[i] = NULL;
@@ -237,7 +238,7 @@ void SoundMixer::mix(int16 *buf, uint len) {
memset(buf, 0, 2 * len * sizeof(int16));
}
- if (!_paused) {
+ if (!_paused && !_channelsPaused) {
// now mix all channels
for (int i = 0; i != NUM_CHANNELS; i++)
if (_channels[i])
@@ -314,6 +315,10 @@ void SoundMixer::pause(bool paused) {
_paused = paused;
}
+void SoundMixer::pauseChannels(bool paused) {
+ _channelsPaused = paused;
+}
+
bool SoundMixer::hasActiveSFXChannel() {
// FIXME/TODO: We need to distinguish between SFX and music channels
// (and maybe also voice) here to work properly in iMuseDigital