]> git.mxchange.org Git - flightgear.git/commitdiff
* Fix --disable-sound
authorehofman <ehofman>
Sat, 28 Nov 2009 10:42:52 +0000 (10:42 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 29 Nov 2009 14:57:02 +0000 (15:57 +0100)
* Add a new command line option: --sound-device=""
  This makes OpenAL use the sepcified audio device instead of the default
  output device. (Look for playback devices when calling openal-info of alcinfo)

src/Main/fg_init.cxx
src/Main/options.cxx

index cf6c86b702cab88cedfe088ee6495f93f0d1aeea..3d253091d740ee5b434d5028b3564ba1ada646ff 100644 (file)
@@ -1453,7 +1453,7 @@ bool fgInitSubsystems() {
     ////////////////////////////////////////////////////////////////////
 
     globals->get_soundmgr()->bind();
-    globals->get_soundmgr()->init();
+    globals->get_soundmgr()->init(fgGetString("/sim/sound/device-name", NULL));
 
     ////////////////////////////////////////////////////////////////////
     // Initialize the property interpolator subsystem. Put into the INIT
index 73ebf0627d28e853162c7be7eb7e0fc19163606a..2651965ff4ca035129ee4e7410b09ddc6029d886 100644 (file)
@@ -1291,8 +1291,9 @@ struct OptionDesc {
     {"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", true, "", 0 },
-    {"enable-sound",                 false, OPTION_BOOL,   "/sim/sound/enabled", false, "", 0 },
+    {"disable-sound",                false, OPTION_BOOL,   "/sim/sound/enabled", false, "", 0 },
+    {"enable-sound",                 false, OPTION_BOOL,   "/sim/sound/enabled", 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 },
     {"vor",                          true,  OPTION_FUNC,   "", false, "", fgOptVOR },