Commit 975a67f2 authored by Stefan Westerfeld's avatar Stefan Westerfeld

Add developer option --test-no-limiter to disable limiter.

Users should not need to use this.
Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 522b2028
......@@ -192,6 +192,10 @@ parse_options (int *argc_p,
{
Params::test_no_sync = true;
}
else if (check_arg (argc, argv, &i, "--test-no-limiter"))
{
Params::test_no_limiter = true;
}
else if (check_arg (argc, argv, &i, "--test-truncate", &opt_arg))
{
Params::test_truncate = atoi (opt_arg);
......
......@@ -692,7 +692,8 @@ add_watermark (const string& infile, const string& outfile, const string& bits)
for (size_t i = 0; i < samples.size(); i++)
samples[i] += orig_samples[i];
samples = limiter.process (samples);
if (!Params::test_no_limiter)
samples = limiter.process (samples);
size_t max_write_frames = total_input_frames - total_output_frames;
if (samples.size() > max_write_frames * n_channels)
......
......@@ -10,6 +10,7 @@ bool Params::snr = false; // compute/show snr while adding waterma
int Params::have_key = 0;
int Params::test_cut = 0; // for sync test
bool Params::test_no_sync = false; // disable sync
bool Params::test_no_limiter = false; // disable limiter
int Params::test_truncate = 0;
Format Params::input_format = Format::AUTO;
......
......@@ -42,6 +42,7 @@ public:
static int test_cut; // for sync test
static bool test_no_sync;
static bool test_no_limiter;
static int test_truncate;
static Format input_format;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment