From 12a31200f29cfd36e93aa407fc56de28db31028d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 20 Mar 2011 23:44:46 +0100 Subject: 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. --- audio/mixer.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'audio/mixer.h') 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. -- cgit v1.2.3