#include <simgear/misc/sgstream.hxx>
#include <simgear/misc/sg_path.hxx>
#include <simgear/scene/material/mat.hxx>
+#include <simgear/sound/soundmgr_openal.hxx>
// #include <Include/general.hxx>
// #include <Airports/simple.hxx>
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
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 );
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 <const char*>devices = smgr.get_available_devices();
+ for (int i=0; i<devices.size(); i++) {
+ printf("%i. \"%s\"\n", i, devices[i]);
+ }
+ devices.clear();
+ exit(0);
}
else if (result == FG_OPTIONS_EXIT)