Fix some TODOs

This commit is contained in:
badaix 2020-06-01 11:47:28 +02:00
parent 775fd21f32
commit fce34d82c8
3 changed files with 14 additions and 9 deletions

View file

@ -155,9 +155,9 @@ int main(int argc, char** argv)
#endif
std::shared_ptr<popl::Value<std::string>> mixer_mode;
if (hw_mixer_supported)
mixer_mode = op.add<Value<string>>("", "mixer", "<software|hardware|script|none>[:<options>]", "software");
mixer_mode = op.add<Value<string>>("", "mixer", "software|hardware|script|none|?[:<options>]", "software");
else
mixer_mode = op.add<Value<string>>("", "mixer", "<software|script|none>[:<options>]", "software");
mixer_mode = op.add<Value<string>>("", "mixer", "software|script|none|?[:<options>]", "software");
try
{
@ -314,6 +314,15 @@ int main(int argc, char** argv)
settings.player.mixer.mode = ClientSettings::Mixer::Mode::script;
else if (mode == "none")
settings.player.mixer.mode = ClientSettings::Mixer::Mode::none;
else if ((mode == "?") || (mode == "help"))
{
cout << "mixer can be one of 'software', " << (hw_mixer_supported ? "'hardware', " : "") << "'script', 'none'\n"
<< "followed by optional parameters:\n"
<< " * software[:poly[:<exponent>]|exp[:<base>]]\n"
<< (hw_mixer_supported ? " * hardware[:<mixer name>]\n":"")
<< " * script[:<script filename>]\n";
exit(EXIT_SUCCESS);
}
else
throw SnapException("Mixer mode not supported: " + mode);