Hi,
How do you "usually" handle to option in a game to toggle music on/off. Do you load/unload the sounds or do you load all sounds on startup and just toggle the volume between mute/unmute to save load time and potential lag?
// Jonas
Posted 11 March 2013 - 11:30 AM
AFAIK, you just set the output volume to zero, and disable any sound processing,
a WIP 2d game engine: https://code.google.com/p/modulusengine/
English is not my first language, so do feel free to correct me ![]()
Posted 11 March 2013 - 08:45 PM
Posted 12 March 2013 - 12:12 AM
Posted 13 March 2013 - 03:34 AM
FWIW:Well, if the sound is off during loading and then the user turns it on what will you do?
You should probably be streaming your music unless you're using a midi-style format, which is trivial to load.
To turn music on or off just make the update function for the music processing conditional.
Edited by cr88192, 13 March 2013 - 03:35 AM.
Current Status / Downloads: http://cr88192.dyndns.org:8080/wiki/index.php/BGB_Current_Status
YouTube Channel: http://www.youtube.com/user/BGBTech
Main Page: http://cr88192.dyndns.org:8080/wiki/index.php/Main_Page
Forums: http://cr88192.dyndns.org:8080/phpBB3