Originally Posted by
C_ntua
They way I had implemented it is to use a bool variable for all sounds and check that before you play the sound. The Mute button will just set that variable.
If you want to be more elegant and maybe save re-writing code and stuff, you can create your own Play() method and put the actual method that plays the sound in there. Then give it parameters and make it check internally for the "muteAll" bool variable. Then simply do a Find-Replace to replace all previous play methods accordingly and you are done.
You can use other methods if you want to actually mute the volume. You can use DirectX for that matter. I have some code for that (unfortunately wasted) that I can give you here if that is the solution you want. Of course it is more complicated than what I mentioned above and less efficient since why play the sound if nobody will hear it?