aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMax Horn2003-09-06 10:47:30 +0000
committerMax Horn2003-09-06 10:47:30 +0000
commit0be019601319c8536cf42a64e97408ba6fb1716b (patch)
tree47516a70382359f83871ad61b2e56700fd26aad6 /sound
parentc951e5f8420c858b6253b05fecf362646c872c8a (diff)
downloadscummvm-rg350-0be019601319c8536cf42a64e97408ba6fb1716b.tar.gz
scummvm-rg350-0be019601319c8536cf42a64e97408ba6fb1716b.tar.bz2
scummvm-rg350-0be019601319c8536cf42a64e97408ba6fb1716b.zip
removed pauseMixer method from mixer, and renamed stop to stopChannel
svn-id: r10042
Diffstat (limited to 'sound')
-rw-r--r--sound/mixer.cpp16
-rw-r--r--sound/mixer.h7
2 files changed, 6 insertions, 17 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index 1f8ba5ce39..4cb53ed927 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -137,7 +137,6 @@ SoundMixer::SoundMixer() {
_musicVolume = 0;
_paused = false;
- _channelsPaused = false;
for (i = 0; i != NUM_CHANNELS; i++)
_channels[i] = NULL;
@@ -280,7 +279,7 @@ int SoundMixer::playVorbis(PlayingSoundHandle *handle, OggVorbis_File *ov_file,
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 @@ void SoundMixer::mix(int16 *buf, uint len) {
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 @@ void SoundMixer::stopAll() {
_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 @@ void SoundMixer::setChannelPan(PlayingSoundHandle handle, int8 pan) {
_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) {
diff --git a/sound/mixer.h b/sound/mixer.h
index 8fd7883418..d688513d01 100644
--- a/sound/mixer.h
+++ b/sound/mixer.h
@@ -72,7 +72,7 @@ private:
int _globalVolume;
int _musicVolume;
- bool _paused, _channelsPaused;
+ bool _paused;
Channel *_channels[NUM_CHANNELS];
@@ -112,7 +112,7 @@ public:
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);
@@ -120,9 +120,6 @@ public:
/** 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);