diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 2651965ff..b46424e53 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -45,6 +45,7 @@ #include #include #include +#include // #include // #include @@ -81,7 +82,8 @@ enum FG_OPTIONS_ERROR = 2, FG_OPTIONS_EXIT = 3, FG_OPTIONS_VERBOSE_HELP = 4, - FG_OPTIONS_SHOW_AIRCRAFT = 5 + FG_OPTIONS_SHOW_AIRCRAFT = 5, + FG_OPTIONS_SHOW_SOUND_DEVICES = 6 }; static double @@ -1503,6 +1505,8 @@ parse_option (const string& arg) return(FG_OPTIONS_VERBOSE_HELP); } else if ( arg.find( "--show-aircraft") == 0) { return(FG_OPTIONS_SHOW_AIRCRAFT); + } else if ( arg.find( "--show-sound-devices") == 0) { + return(FG_OPTIONS_SHOW_SOUND_DEVICES); } else if ( arg.find( "--prop:" ) == 0 ) { if (!set_property(arg.substr(7))) { SG_LOG( SG_GENERAL, SG_ALERT, "Bad property assignment: " << arg ); @@ -1618,11 +1622,20 @@ fgParseArgs (int argc, char **argv) verbose = true; else if (result == FG_OPTIONS_SHOW_AIRCRAFT) { - fgOptLogLevel( "alert" ); - SGPath path( globals->get_fg_root() ); - path.append("Aircraft"); - fgShowAircraft(path, true); - exit(0); + fgOptLogLevel( "alert" ); + SGPath path( globals->get_fg_root() ); + path.append("Aircraft"); + fgShowAircraft(path, true); + exit(0); + + } else if (result == FG_OPTIONS_SHOW_SOUND_DEVICES) { + SGSoundMgr smgr; + vector devices = smgr.get_available_devices(); + for (int i=0; i