diff --git a/src/audio.cpp b/src/audio.cpp index ff63a74b..5ea07481 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -43,5 +43,32 @@ void Audio::Setup(int channels) #endif } +void Audio::SetVolume(int channel, int volume) +{ +#if defined USE_SDL_MIXER + Mix_Volume(channel,volume); +#else + UNUSED(channel); +#endif +} + +void Audio::MuteAll() +{ +#if defined USE_SDL_MIXER + Mix_Volume(-1,0); +#else + UNUSED(false); +#endif +} + +void Audio::UnmuteAll() +{ +#if defined USE_SDL_MIXER + Mix_Volume(-1,MIX_MAX_VOLUME); +#else + UNUSED(false); +#endif +} + } /* namespace lol */ diff --git a/src/audio.h b/src/audio.h index d2f99bd1..c340ba59 100644 --- a/src/audio.h +++ b/src/audio.h @@ -26,6 +26,9 @@ class Audio { public: static void Setup(int channels); + static void SetVolume(int channel,int volume); + static void MuteAll(); + static void UnmuteAll(); private: Audio() {}