[Scummvm-cvs-logs] SF.net SVN: scummvm: [25605] scummvm/trunk/sound/mixer.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Thu Feb 15 13:47:10 CET 2007
Revision: 25605
http://scummvm.svn.sourceforge.net/scummvm/?rev=25605&view=rev
Author: fingolfin
Date: 2007-02-15 04:47:09 -0800 (Thu, 15 Feb 2007)
Log Message:
-----------
Fix for bug #1660559: MANIAC/ZAK: Music does not stop when pausing (regression)
Modified Paths:
--------------
scummvm/trunk/sound/mixer.cpp
Modified: scummvm/trunk/sound/mixer.cpp
===================================================================
--- scummvm/trunk/sound/mixer.cpp 2007-02-15 12:00:13 UTC (rev 25604)
+++ scummvm/trunk/sound/mixer.cpp 2007-02-15 12:47:09 UTC (rev 25605)
@@ -246,7 +246,7 @@
// zero the buf
memset(buf, 0, 2 * len * sizeof(int16));
- if (_premixChannel)
+ if (_premixChannel && !_premixChannel->isPaused())
_premixChannel->mix(buf, len);
// now mix all channels
@@ -270,13 +270,16 @@
void Mixer::stopAll(bool force) {
Common::StackLock lock(_mutex);
- for (int i = 0; i != NUM_CHANNELS; i++)
+ for (int i = 0; i != NUM_CHANNELS; i++) {
if (_channels[i] != 0) {
if (force || !_channels[i]->isPermanent()) {
delete _channels[i];
_channels[i] = 0;
}
}
+ }
+
+ // Note: the _premixChannel is *not* affected by stopAll!
}
void Mixer::stopID(int id) {
@@ -338,6 +341,10 @@
_channels[i]->pause(paused);
}
}
+
+ // Unlike stopAll, we also pause the premix channel, if present.
+ if (_premixChannel)
+ _premixChannel->pause(paused);
}
void Mixer::pauseID(int id, bool paused) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list