aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2011-04-16 18:20:37 +0200
committerJohannes Schickel2011-04-16 18:30:45 +0200
commit6b0ccbb095917d5f98722b26bef07d4a0816bb3b (patch)
treef20a3f2449bb670f9f39c271367625e5071d205f
parentf61eff4404751ad4bf53e8295ea4d5b77847bbed (diff)
downloadscummvm-rg350-6b0ccbb095917d5f98722b26bef07d4a0816bb3b.tar.gz
scummvm-rg350-6b0ccbb095917d5f98722b26bef07d4a0816bb3b.tar.bz2
scummvm-rg350-6b0ccbb095917d5f98722b26bef07d4a0816bb3b.zip
AUDIO: Renamed mute related functions in Mixer.
This renames setMuteForSoundType to muteSoundType and getMuteForSoundType to isSoundTypeMuted.
-rw-r--r--audio/mixer.cpp6
-rw-r--r--audio/mixer.h6
-rw-r--r--audio/mixer_intern.h4
-rw-r--r--engines/draci/sound.cpp4
-rw-r--r--engines/engine.cpp8
5 files changed, 14 insertions, 14 deletions
diff --git a/audio/mixer.cpp b/audio/mixer.cpp
index 547d2d5f55..a2b50ddbc4 100644
--- a/audio/mixer.cpp
+++ b/audio/mixer.cpp
@@ -325,7 +325,7 @@ void MixerImpl::stopHandle(SoundHandle handle) {
_channels[index] = 0;
}
-void MixerImpl::setMuteForSoundType(SoundType type, bool mute) {
+void MixerImpl::muteSoundType(SoundType type, bool mute) {
assert(0 <= type && type < ARRAYSIZE(_mute));
_mute[type] = mute;
@@ -335,7 +335,7 @@ void MixerImpl::setMuteForSoundType(SoundType type, bool mute) {
}
}
-bool MixerImpl::getMuteForSoundType(SoundType type) const {
+bool MixerImpl::isSoundTypeMuted(SoundType type) const {
assert(0 <= type && type < ARRAYSIZE(_mute));
return _mute[type];
}
@@ -504,7 +504,7 @@ void Channel::updateChannelVolumes() {
// volume is in the range 0 - kMaxMixerVolume.
// Hence, the vol_l/vol_r values will be in that range, too
- if (!_mixer->getMuteForSoundType(_type)) {
+ if (!_mixer->isSoundTypeMuted(_type)) {
int vol = _mixer->getVolumeForSoundType(_type) * _volume;
if (_balance == 0) {
diff --git a/audio/mixer.h b/audio/mixer.h
index fe24b85613..89b50e550f 100644
--- a/audio/mixer.h
+++ b/audio/mixer.h
@@ -200,17 +200,17 @@ public:
/**
* Set the mute state for a given sound type.
*
- * @param mute Whether to mute (= true) or not (= false).
* @param type the sound type
+ * @param mute Whether to mute (= true) or not (= false).
*/
- virtual void setMuteForSoundType(SoundType type, bool mute) = 0;
+ virtual void muteSoundType(SoundType type, bool mute) = 0;
/**
* Query the mute state for a given sound type.
*
* @param type the sound type
*/
- virtual bool getMuteForSoundType(SoundType type) const = 0;
+ virtual bool isSoundTypeMuted(SoundType type) const = 0;
/**
* Set the channel volume for the given handle.
diff --git a/audio/mixer_intern.h b/audio/mixer_intern.h
index c42436b9a4..14dff5d53b 100644
--- a/audio/mixer_intern.h
+++ b/audio/mixer_intern.h
@@ -98,8 +98,8 @@ public:
virtual bool isSoundHandleActive(SoundHandle handle);
- virtual void setMuteForSoundType(SoundType type, bool mute);
- virtual bool getMuteForSoundType(SoundType type) const;
+ virtual void muteSoundType(SoundType type, bool mute);
+ virtual bool isSoundTypeMuted(SoundType type) const;
virtual void setChannelVolume(SoundHandle handle, byte volume);
virtual void setChannelBalance(SoundHandle handle, int8 balance);
diff --git a/engines/draci/sound.cpp b/engines/draci/sound.cpp
index c1ec235246..0df19794f7 100644
--- a/engines/draci/sound.cpp
+++ b/engines/draci/sound.cpp
@@ -422,8 +422,8 @@ void Sound::setVolume() {
_muteSound = _muteVoice = true;
}
- _mixer->setMuteForSoundType(Audio::Mixer::kSFXSoundType, _muteSound);
- _mixer->setMuteForSoundType(Audio::Mixer::kSpeechSoundType, _muteVoice);
+ _mixer->muteSoundType(Audio::Mixer::kSFXSoundType, _muteSound);
+ _mixer->muteSoundType(Audio::Mixer::kSpeechSoundType, _muteVoice);
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 8145a550ab..71f9b68f44 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -439,10 +439,10 @@ void Engine::syncSoundSettings() {
if (ConfMan.hasKey("mute"))
mute = ConfMan.getBool("mute");
- _mixer->setMuteForSoundType(Audio::Mixer::kPlainSoundType, mute);
- _mixer->setMuteForSoundType(Audio::Mixer::kMusicSoundType, mute);
- _mixer->setMuteForSoundType(Audio::Mixer::kSFXSoundType, mute);
- _mixer->setMuteForSoundType(Audio::Mixer::kSpeechSoundType, mute);
+ _mixer->muteSoundType(Audio::Mixer::kPlainSoundType, mute);
+ _mixer->muteSoundType(Audio::Mixer::kMusicSoundType, mute);
+ _mixer->muteSoundType(Audio::Mixer::kSFXSoundType, mute);
+ _mixer->muteSoundType(Audio::Mixer::kSpeechSoundType, mute);
_mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, Audio::Mixer::kMaxMixerVolume);
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic);
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, soundVolumeSFX);