diff options
author | Johannes Schickel | 2011-03-20 23:44:46 +0100 |
---|---|---|
committer | Johannes Schickel | 2011-04-13 23:48:51 +0200 |
commit | 12a31200f29cfd36e93aa407fc56de28db31028d (patch) | |
tree | 3a259af8a1d796723b3863f74aadf3d6bb4610a4 /audio/mixer.h | |
parent | 41706cb4d9c2fe383de11bf84b73e46b9f9147f9 (diff) | |
download | scummvm-rg350-12a31200f29cfd36e93aa407fc56de28db31028d.tar.gz scummvm-rg350-12a31200f29cfd36e93aa407fc56de28db31028d.tar.bz2 scummvm-rg350-12a31200f29cfd36e93aa407fc56de28db31028d.zip |
AUDIO: Add per sound type mute flag setting to Mixer(Impl).
This also adapts our default implementation MixerImpl to handle the newly
added flags properly.
Now we do not need to set the sound volume for all types to 0, in case we want
to mute them, but instead just set the mute flag for all types to true. This
allows engines to be a bit more agonstic about mute support, when it comes to
volume options etc. since they can just setup any volume they like, but are
still muted (and thus will not break muting anymore).
MIDI sound is of course not affected by this.
Diffstat (limited to 'audio/mixer.h')
-rw-r--r-- | audio/mixer.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/audio/mixer.h b/audio/mixer.h index a048124ca3..fe24b85613 100644 --- a/audio/mixer.h +++ b/audio/mixer.h @@ -197,6 +197,20 @@ public: virtual bool isSoundHandleActive(SoundHandle handle) = 0; + /** + * Set the mute state for a given sound type. + * + * @param mute Whether to mute (= true) or not (= false). + * @param type the sound type + */ + virtual void setMuteForSoundType(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; /** * Set the channel volume for the given handle. |