|
From: Tapio V. <aa...@us...> - 2010-08-22 17:48:15
|
Module: performous
Branch: master
Commit: f3befcd79b2a4fee063ca7e2102f7ed0d1f53b6b
Author: Tapio Vierros <tap...@gm...>
Date: Sun Aug 22 20:46:37 2010 +0300
Add --audiohelp cmdline parameter.
---
game/main.cc | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index f37f9bb..f35a04a 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -280,12 +280,13 @@ int main(int argc, char** argv) try {
std::string songlist;
opt1.add_options()
("help,h", "you are viewing it")
- ("verbose,V", "Be more verbose")
+ ("verbose,V", "be more verbose")
("version,v", "display version number")
("songlist", po::value<std::string>(&songlist), "save a list of songs in the specified folder");
po::options_description opt2("Configuration options");
opt2.add_options()
("audio", po::value<std::vector<std::string> >(&devices)->composing(), "specify an audio device to use")
+ ("audiohelp", "print audio related information")
("jstest", "utility to get joystick button mappings");
po::options_description opt3("Hidden options");
opt3.add_options()
@@ -332,6 +333,15 @@ int main(int argc, char** argv) try {
std::cerr << e.what() << std::endl;
return EXIT_FAILURE;
}
+ if (vm.count("audiohelp")) {
+ Audio audio;
+ std::cout << "Example --audio parameters" << std::endl;
+ std::cout << " --audio \"out=2\" # Pick first working two-channel playback device" << std::endl;
+ std::cout << " --audio \"dev=1 out=2\" # Pick device id 1 and assign stereo playback" << std::endl;
+ std::cout << " --audio 'dev=\"HDA Intel\" mics=blue,red' # HDA Intel with two mics" << std::endl;
+ std::cout << " --audio 'dev=pulse out=2 mics=blue' # PulseAudio with input and output" << std::endl;
+ return EXIT_SUCCESS;
+ }
// Override XML config for options that were specified from commandline or performous.conf
confOverride(songdirs, "system/path_songs");
confOverride(devices, "audio/devices");
|