4#include "dependencies/CLI11/CLI11.hpp"
25 app.add_option (
"--data-root-path,-d", m_dataRootPath,
"Data root path");
26 app.add_option (
"--tags,-t", m_tags,
"Test tags");
27 app.add_option (
"--seed,-s", m_seed,
"Random seed")->default_val (0);
32 "Number of displayed decimal places for samples' linear values in test output"
38 "Number of displayed decimal places for values in decidels in test output"
44 "Number of displayed decimal places for values in seconds in test output"
50 "Number of displayed decimal places for values in hertz in test output"
56 "Number of displayed decimal places for values in radians in test output"
62 "Number of displayed decimal places for values in cents in test output"
67 m_defaultBlockSizeFrames,
68 "Default max block size in frames (samples). All tests will run with this block size, unless other value is explicitly set via withBlockSize()."
69 )->default_val (1024);
73 m_defaultNumInputChannels,
74 "Default number of input channels. All tests will run with this number of output channels, unless other value is explicitly selected via withOutputChannels() or a similar modifier."
79 m_defaultNumOutputChannels,
80 "Default number of output channels. All tests will run with this number of input channels, unless other value is explicitly selected via withInputChannels() or a similar modifier."
85 m_defaultSampleRateHz,
86 "Default sample rate in Hz. All tests will run with this sample rate, unless other value is explicitly stated via withSampleRate()."
87 )->default_val (44100.0);
91 m_defaultRenderDurationSeconds,
92 "Default render duration in seconds. All tests will render this amount of audio (excluding optional warm-up time), unless explicitly overridden with withDuration()."
95 app.add_flag (
"--run-generators,-g", m_runGeneratorsNotTests,
"Run generators instead of tests");
96 app.add_flag (
"--shuffle", m_shuffle,
"Shuffle task order. Obeys --seed value.");
128 std::string
getTags()
const {
return m_tags; }
138 CLI::App app {
"HART" };
140 std::string m_dataRootPath =
".";
141 std::string m_tags =
"";
142 uint_fast32_t m_seed = 0;
143 bool m_runGeneratorsNotTests =
false;
144 bool m_shuffle =
false;
146 int m_linDecimals = 0;
147 int m_dbDecimals = 0;
148 int m_secDecimals = 0;
149 int m_hzDecimals = 0;
150 int m_radDecimals = 0;
151 int m_centsDecimals = 0;
153 size_t m_defaultBlockSizeFrames = 1024;
154 size_t m_defaultNumInputChannels = 1;
155 size_t m_defaultNumOutputChannels = 1;
156 double m_defaultSampleRateHz = 44100.0;
157 double m_defaultRenderDurationSeconds = 0.1;
159 CLIConfig() =
default;
Holds values set by the user via CLI interface.
double getDefaultRenderDurationSeconds() const
int getHzDecimals() const
size_t getDefaultNumOutputChannels() const
bool shouldShuffleTasks() const
bool shouldRunGenerators() const
int getCentsDecimals() const
int getSecDecimals() const
uint_fast32_t getRandomSeed() const
Gets random seed set by a "`--seed`/`-s`" argument.
int getRadDecimals() const
size_t getDefaultNumInputChannels() const
std::string getDataRootPath() const
Get data root path set by a "`--data-root-path`,`-d`" argument.
double getDefaultSampleRateHz() const
size_t getGefaultBlockSizeFrames() const
void initCommandLineArgs()
Inits the CLI arguments.
int getDbDecimals() const
static CLIConfig & getInstance()
Get the singleton instance.
size_t getDefaultRenderDurationFrames() const
std::string getTags() const
int getLinDecimals() const