Check the number of arguments in the jack client

This commit is contained in:
Paul Ferrand 2020-01-19 19:01:55 +01:00
parent 994fe1738d
commit 6099ac64f2

View file

@ -170,6 +170,11 @@ int main(int argc, char** argv)
{
// std::ios::sync_with_stdio(false);
auto arguments = absl::ParseCommandLine(argc, argv);
if (arguments.size() < 2) {
std::cout << "You need to specify an SFZ file to load." << '\n';
return -1;
}
auto filesToParse = absl::MakeConstSpan(arguments).subspan(1);
const std::string oversampling = absl::GetFlag(FLAGS_oversampling);
const uint32_t preload_size = absl::GetFlag(FLAGS_preload_size);