[Scummvm-cvs-logs] CVS: scummvm/sound mixer.h,1.51,1.52 mixer.cpp,1.123,1.124
Max Horn
fingolfin at users.sourceforge.net
Sat Sep 6 03:48:03 CEST 2003
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv21491/sound
Modified Files:
mixer.h mixer.cpp
Log Message:
removed pauseMixer method from mixer, and renamed stop to stopChannel
Index: mixer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- mixer.h 5 Sep 2003 22:09:56 -0000 1.51
+++ mixer.h 6 Sep 2003 10:47:29 -0000 1.52
@@ -72,7 +72,7 @@
int _globalVolume;
int _musicVolume;
- bool _paused, _channelsPaused;
+ bool _paused;
Channel *_channels[NUM_CHANNELS];
@@ -112,16 +112,13 @@
void stopAll();
/** stop playing the given channel */
- void stop(int channel);
+ void stopChannel(int channel);
/** stop playing the sound with given ID */
void stopID(int id);
/** stop playing the channel for the given handle */
void stopHandle(PlayingSoundHandle handle);
-
- /** pause/unpause all mixing (including adlib) */
- void pauseMixer(bool paused);
/** pause/unpause all channels */
void pauseAll(bool paused);
Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- mixer.cpp 5 Sep 2003 23:27:11 -0000 1.123
+++ mixer.cpp 6 Sep 2003 10:47:29 -0000 1.124
@@ -137,7 +137,6 @@
_musicVolume = 0;
_paused = false;
- _channelsPaused = false;
for (i = 0; i != NUM_CHANNELS; i++)
_channels[i] = NULL;
@@ -280,7 +279,7 @@
void SoundMixer::mix(int16 *buf, uint len) {
StackLock lock(_mutex);
- if (_premixProc && !_paused) {
+ if (_premixProc) {
int i;
_premixProc(_premixParam, buf, len);
// Convert mono data from the premix proc to stereo
@@ -292,7 +291,7 @@
memset(buf, 0, 2 * len * sizeof(int16));
}
- if (!_paused && !_channelsPaused) {
+ if (!_paused) {
// now mix all channels
for (int i = 0; i != NUM_CHANNELS; i++)
if (_channels[i] && !_channels[i]->isPaused())
@@ -315,7 +314,7 @@
_channels[i]->destroy();
}
-void SoundMixer::stop(int index) {
+void SoundMixer::stopChannel(int index) {
if ((index < 0) || (index >= NUM_CHANNELS)) {
warning("soundMixer::stop has invalid index %d", index);
return;
@@ -388,15 +387,8 @@
_channels[index]->setChannelPan(pan);
}
-void SoundMixer::pauseMixer(bool paused) {
- // TODO/FIXME: This is only used by scumm/sound.cpp, and
- // even there it can probably be replaced by a call to pauseAll.
- // Research that, and if possible remove this method.
- _paused = paused;
-}
-
void SoundMixer::pauseAll(bool paused) {
- _channelsPaused = paused;
+ _paused = paused;
}
void SoundMixer::pauseChannel(int index, bool paused) {
More information about the Scummvm-git-logs
mailing list