CVS: source/src/Main main.cxx,1.311,1.312
Erik Hofman <[email protected]> Sat, 10 Apr 2010 04:38:56 -0500
| Newsgroups | gmane.games.flightgear.cvc |
|---|---|
| Message-ID | <[email protected]> |
Update of /var/cvs/FlightGear-0.9/source/src/Main
In directory baron.flightgear.org:/tmp/cvs-serv10357
Modified Files:
main.cxx
Log Message:
allow reinitializing the sound system by setting /sim/sound/working to false at runtime.
Index: main.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Main/main.cxx,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -r1.311 -r1.312
--- main.cxx 23 Jan 2010 22:27:17 -0000 1.311
+++ main.cxx 10 Apr 2010 09:37:22 -0000 1.312
@@ -485,8 +485,8 @@
// is processing the scenery (doubled the frame-rate for me) -EMH-
#ifdef ENABLE_AUDIO_SUPPORT
static bool smgr_init = true;
+ static SGPropertyNode *sound_working = fgGetNode("/sim/sound/working");
if (smgr_init == true) {
- static SGPropertyNode *sound_working = fgGetNode("/sim/sound/working");
if (sound_working->getBoolValue() == true) {
fgInitSoundManager();
smgr_init = false;
@@ -496,6 +496,11 @@
static SGSoundMgr *smgr = globals->get_soundmgr();
static bool smgr_enabled = true;
+ if (sound_working->getBoolValue() == false) { // request to reinit
+ smgr->reinit();
+ sound_working->setBoolValue(true);
+ }
+
if (smgr_enabled != sound_enabled->getBoolValue()) {
if (smgr_enabled == true) { // request to suspend
smgr->suspend();
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev