Mute all sounds and set master volume

chaosavy

04-12-2010 16:29:12

I'm in the process of creating the Sound options menu for my game, so basically I want the user to be able to turn all the sounds off and set the volume.

What I'm doing right now is based on a slider widget (using CEGUI) I set the master volume and based on a check box widget I set ->muteAllSounds() or ->unmuteAllSounds(). Mute and unmute seem to just set the master volume to 0 or revert it back, is there a way to just plain disable the sound engine (not play any sounds)?

thanks

stickymango

04-12-2010 19:44:10

No there isn't any function to do that.

chaosavy

04-12-2010 20:41:49

thanks for the reply, I'll put it in there

pseudocode:



disable()

stopAllSounds();
set flag disable =true


play()
if diable flag = true
return

stickymango

06-12-2010 13:46:32

Yeah, I would class this as an application specific implementation, a sound libs purpose is to deliver sound, doesn't really make sense to add a 'play no sound' option.. :lol: