mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-31 18:06:15 +02:00
Fix some TODOs
This commit is contained in:
parent
775fd21f32
commit
fce34d82c8
3 changed files with 14 additions and 9 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ void Config::init(const std::string& root_directory, const std::string& user, co
|
|||
try
|
||||
{
|
||||
ifstream ifs(filename_, std::ifstream::in);
|
||||
if ((ifs.good()) && (ifs.peek() != std::ifstream::traits_type::eof()))
|
||||
if (ifs.good() && (ifs.peek() != std::ifstream::traits_type::eof()))
|
||||
{
|
||||
json j;
|
||||
ifs >> j;
|
||||
|
@ -101,8 +101,8 @@ void Config::init(const std::string& root_directory, const std::string& user, co
|
|||
{
|
||||
GroupPtr group = make_shared<Group>();
|
||||
group->fromJson(jGroup);
|
||||
// if (client->id.empty() || getClientInfo(client->id))
|
||||
// continue;
|
||||
// if (client->id.empty() || getClientInfo(client->id))
|
||||
// continue;
|
||||
groups.push_back(group);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -221,10 +221,6 @@ int main(int argc, char* argv[])
|
|||
else
|
||||
throw SnapException("Invalid log sink: " + settings.logging.sink);
|
||||
|
||||
// TODO: op vs conf
|
||||
for (const auto& opt : conf.unknown_options())
|
||||
LOG(WARNING) << "unknown configuration option: " << opt << "\n";
|
||||
|
||||
if (!streamValue->is_set())
|
||||
settings.stream.pcmStreams.push_back(streamValue->value());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue