From ef4814599d3985164b58c817616d80235ca70c99 Mon Sep 17 00:00:00 2001 From: ehofman <ehofman> Date: Sat, 28 Nov 2009 10:42:52 +0000 Subject: [PATCH] * Fix --disable-sound * 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 | 2 +- src/Main/options.cxx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index cf6c86b70..3d253091d 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -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 diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 73ebf0627..2651965ff 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -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 },