From: Erik H. <eh...@ba...> - 2009-11-30 12:05:39
|
Update of /var/cvs/FlightGear-0.9/source/src/Main In directory baron.flightgear.org:/tmp/cvs-serv32068/Main Modified Files: fg_props.cxx main.cxx options.cxx Log Message: Change of thoughts since it makes life easier: /sim/sound/working enable/disable the use of OpenAL /sin/sound/enabled master mute/unmute Index: fg_props.cxx =================================================================== RCS file: /var/cvs/FlightGear-0.9/source/src/Main/fg_props.cxx,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- fg_props.cxx 24 Oct 2009 08:31:40 -0000 1.41 +++ fg_props.cxx 30 Nov 2009 12:05:22 -0000 1.42 @@ -226,7 +226,7 @@ if ( smgr != NULL ) { if ( f ) { smgr->suspend(); - } else if (!fgGetBool("/sim/sound/pause")) { + } else if (fgGetBool("/sim/sound/working")) { smgr->resume(); } } Index: main.cxx =================================================================== RCS file: /var/cvs/FlightGear-0.9/source/src/Main/main.cxx,v retrieving revision 1.305 retrieving revision 1.306 diff -u -r1.305 -r1.306 --- main.cxx 29 Nov 2009 10:24:47 -0000 1.305 +++ main.cxx 30 Nov 2009 12:05:22 -0000 1.306 @@ -481,19 +481,19 @@ // Update the sound manager last so it can use the CPU while the GPU // is processing the scenery (doubled the frame-rate for me) -EMH- #ifdef ENABLE_AUDIO_SUPPORT - static SGPropertyNode *sound_pause = fgGetNode("/sim/sound/pause"); + static SGPropertyNode *sound_enabled = fgGetNode("/sim/sound/enabled"); static SGSoundMgr *smgr = globals->get_soundmgr(); - static bool smgr_suspend = false; - if (smgr_suspend != sound_pause->getBoolValue()) { - if (smgr_suspend == false) { // request to suspend + static bool smgr_enabled = true; + if (smgr_enabled != sound_enabled->getBoolValue()) { + if (smgr_enabled == true) { // request to suspend smgr->suspend(); } else { smgr->resume(); } - smgr_suspend = sound_pause->getBoolValue(); + smgr_enabled = sound_enabled->getBoolValue(); } - if (smgr_suspend == false) { + if (smgr_enabled == true) { static SGPropertyNode *volume = fgGetNode("/sim/sound/volume"); smgr->set_volume(volume->getFloatValue()); smgr->update(delta_time_sec); @@ -505,7 +505,7 @@ if (!scenery_loaded && globals->get_tile_mgr()->isSceneryLoaded() && cur_fdm_state->get_inited()) { fgSetBool("sim/sceneryloaded",true); - if (fgGetBool("/sim/sound/enabled")) { + if (fgGetBool("/sim/sound/working")) { smgr->activate(); } else { smgr->stop(); Index: options.cxx =================================================================== RCS file: /var/cvs/FlightGear-0.9/source/src/Main/options.cxx,v retrieving revision 1.127 retrieving revision 1.128 diff -u -r1.127 -r1.128 --- options.cxx 30 Nov 2009 08:42:29 -0000 1.127 +++ options.cxx 30 Nov 2009 12:05:23 -0000 1.128 @@ -189,7 +189,7 @@ fgSetBool("/sim/hud/visibility", false); fgSetBool("/sim/panel/visibility", true); fgSetBool("/sim/sound/enabled", true); - fgSetBool("/sim/sound/pause", false); + fgSetBool("/sim/sound/working", true); // Flight Model options fgSetString("/sim/flight-model", "jsb"); @@ -1293,8 +1293,8 @@ {"enable-hud", false, OPTION_BOOL, "/sim/hud/visibility", true, "", 0 }, {"disable-panel", false, OPTION_BOOL, "/sim/panel/visibility", false, "", 0 }, {"enable-panel", false, OPTION_BOOL, "/sim/panel/visibility", true, "", 0 }, - {"disable-sound", false, OPTION_BOOL, "/sim/sound/enabled", false, "", 0 }, - {"enable-sound", false, OPTION_BOOL, "/sim/sound/enabled", true, "", 0 }, + {"disable-sound", false, OPTION_BOOL, "/sim/sound/working", false, "", 0 }, + {"enable-sound", false, OPTION_BOOL, "/sim/sound/working", true, "", 0 }, {"sound-device", true, OPTION_STRING, "/sim/sound/device-name", false, "", 0 }, {"airport", true, OPTION_STRING, "/sim/presets/airport-id", false, "", 0 }, {"runway", true, OPTION_FUNC, "", false, "", fgOptRunway }, |