SGTimeStamp last_time_stamp;
SGTimeStamp current_time_stamp;
+void fgSetNewSoundDevice(const char *);
+
// The atexit() function handler should know when the graphical subsystem
// is initialized.
extern int _bootstrap_OSInit;
} else {
smgr->stop();
}
+ globals->get_props()->tie("/sim/sound/device", SGRawValueFunctions<const char *>(0, fgSetNewSoundDevice), false);
}
fgRequestRedraw();
SG_LOG( SG_ALL, SG_DEBUG, "" );
}
+void fgSetNewSoundDevice(const char *device)
+{
+ globals->get_soundmgr()->suspend();
+ globals->get_soundmgr()->stop();
+ globals->get_soundmgr()->init(device);
+ globals->get_soundmgr()->resume();
+}
+
// Operation for querying OpenGL parameters. This must be done in a
// valid OpenGL context, potentially in another thread.
namespace
fgSetBool("/sim/rendering/shading", true);
fgSetBool("/sim/rendering/skyblend", true);
fgSetBool("/sim/rendering/textures", true);
- fgTie( "/sim/rendering/filtering", SGGetTextureFilter, SGSetTextureFilter, false);
+ fgTie( "/sim/rendering/filtering", SGGetTextureFilter, SGSetTextureFilter, false);
fgSetInt("/sim/rendering/filtering", 1);
fgSetBool("/sim/rendering/wireframe", false);
fgSetBool("/sim/rendering/horizon-effect", false);