Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
1b2e912e
Commit
1b2e912e
authored
Aug 03, 2022
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Produce better error messages for some commands.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
9cf8e2b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
audiowmark.cc
src/audiowmark.cc
+16
-16
No files found.
src/audiowmark.cc
View file @
1b2e912e
...
...
@@ -813,51 +813,51 @@ main (int argc, char **argv)
}
else
if
(
ap
.
parse_cmd
(
"gentest"
))
{
if
(
ap
.
parse_args
(
2
,
args
))
return
gentest
(
args
[
0
],
args
[
1
]);
args
=
parse_positional
(
ap
,
"input_wav"
,
"output_wav"
);
return
gentest
(
args
[
0
],
args
[
1
]);
}
else
if
(
ap
.
parse_cmd
(
"cut-start"
))
{
if
(
ap
.
parse_args
(
3
,
args
))
return
cut_start
(
args
[
0
],
args
[
1
],
args
[
2
]);
args
=
parse_positional
(
ap
,
"input_wav"
,
"output_wav"
,
"cut_samples"
);
return
cut_start
(
args
[
0
],
args
[
1
],
args
[
2
]);
}
else
if
(
ap
.
parse_cmd
(
"test-subtract"
))
{
if
(
ap
.
parse_args
(
3
,
args
))
return
test_subtract
(
args
[
0
],
args
[
1
],
args
[
2
]);
args
=
parse_positional
(
ap
,
"input1_wav"
,
"input2_wav"
,
"output_wav"
);
return
test_subtract
(
args
[
0
],
args
[
1
],
args
[
2
]);
}
else
if
(
ap
.
parse_cmd
(
"test-snr"
))
{
if
(
ap
.
parse_args
(
2
,
args
))
return
test_snr
(
args
[
0
],
args
[
1
]);
args
=
parse_positional
(
ap
,
"orig_wav"
,
"watermarked_wav"
);
return
test_snr
(
args
[
0
],
args
[
1
]);
}
else
if
(
ap
.
parse_cmd
(
"test-clip"
))
{
parse_shared_options
(
ap
);
if
(
ap
.
parse_args
(
4
,
args
))
return
test_clip
(
args
[
0
],
args
[
1
],
atoi
(
args
[
2
].
c_str
()),
atoi
(
args
[
3
].
c_str
()));
args
=
parse_positional
(
ap
,
"input_wav"
,
"output_wav"
,
"seed"
,
"seconds"
);
return
test_clip
(
args
[
0
],
args
[
1
],
atoi
(
args
[
2
].
c_str
()),
atoi
(
args
[
3
].
c_str
()));
}
else
if
(
ap
.
parse_cmd
(
"test-speed"
))
{
parse_shared_options
(
ap
);
if
(
ap
.
parse_args
(
1
,
args
))
return
test_speed
(
atoi
(
args
[
0
].
c_str
()));
args
=
parse_positional
(
ap
,
"seed"
);
return
test_speed
(
atoi
(
args
[
0
].
c_str
()));
}
else
if
(
ap
.
parse_cmd
(
"test-gen-noise"
))
{
parse_shared_options
(
ap
);
if
(
ap
.
parse_args
(
3
,
args
))
return
test_gen_noise
(
args
[
0
],
atof
(
args
[
1
].
c_str
()),
atoi
(
args
[
2
].
c_str
()));
args
=
parse_positional
(
ap
,
"output_wav"
,
"seconds"
,
"sample_rate"
);
return
test_gen_noise
(
args
[
0
],
atof
(
args
[
1
].
c_str
()),
atoi
(
args
[
2
].
c_str
()));
}
else
if
(
ap
.
parse_cmd
(
"test-change-speed"
))
{
parse_shared_options
(
ap
);
if
(
ap
.
parse_args
(
3
,
args
))
return
test_change_speed
(
args
[
0
],
args
[
1
],
atof
(
args
[
2
].
c_str
()));
args
=
parse_positional
(
ap
,
"input_wav"
,
"output_wav"
,
"speed"
);
return
test_change_speed
(
args
[
0
],
args
[
1
],
atof
(
args
[
2
].
c_str
()));
}
else
if
(
ap
.
parse_cmd
(
"test-resample"
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment