diff --git a/bungee/CommandLine.h b/bungee/CommandLine.h index 46c9f58..efd746d 100644 --- a/bungee/CommandLine.h +++ b/bungee/CommandLine.h @@ -30,7 +30,7 @@ struct Options : { std::vector helpGroups; - Options(std::string program_name = "bungee", std::string help_string = std::string("Bungee audio speed and pitch changer\n\nVersion: ") + Bungee::Stretcher::version() + "\n") : + Options(std::string program_name, std::string help_string) : cxxopts::Options(program_name, help_string) { add_options() // diff --git a/cmd/main.cpp b/cmd/main.cpp index 56cdebe..ef20e4c 100644 --- a/cmd/main.cpp +++ b/cmd/main.cpp @@ -1,7 +1,6 @@ // Copyright (C) 2024 Parabola Research Limited // SPDX-License-Identifier: MPL-2.0 -#include "bungee/../src/log2.h" #include "bungee/Bungee.h" #include "bungee/CommandLine.h" @@ -11,15 +10,17 @@ int main(int argc, const char *argv[]) Request request{}; - constexpr int log2SynthesisHop = 9; +#ifndef BUNGEE_IMPLEMENTATION +# define BUNGEE_IMPLEMENTATION Basic +#endif +#define XSTR(a) STR(a) +#define STR(A) #A + static const auto helpString = std::string("Bungee " XSTR(BUNGEE_IMPLEMENTATION)) + " audio speed and pitch changer\n\nVersion: " + Bungee::Stretcher::version() + "\n"; - CommandLine::Options options; + CommandLine::Options options{"", helpString}; CommandLine::Parameters parameters{options, argc, argv, request}; CommandLine::Processor processor{parameters, request}; -#ifndef BUNGEE_IMPLEMENTATION -# define BUNGEE_IMPLEMENTATION Basic -#endif Bungee::Stretcher stretcher(processor.sampleRates, processor.channelCount); processor.restart(request);