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
0d4af829
Commit
0d4af829
authored
Jun 03, 2022
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement audiowmark cmp --expect-matches option for tests.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
969d1cb9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
0 deletions
+10
-0
audiowmark.cc
src/audiowmark.cc
+2
-0
wmcommon.cc
src/wmcommon.cc
+1
-0
wmcommon.hh
src/wmcommon.hh
+1
-0
wmget.cc
src/wmget.cc
+6
-0
No files found.
src/audiowmark.cc
View file @
0d4af829
...
...
@@ -801,6 +801,8 @@ main (int argc, char **argv)
parse_shared_options
(
ap
);
parse_get_options
(
ap
);
ap
.
parse_opt
(
"--expect-matches"
,
Params
::
expect_matches
);
args
=
parse_positional
(
ap
,
"watermarked_wav"
,
"message_hex"
);
return
get_watermark
(
args
[
0
],
args
[
1
]);
}
...
...
src/wmcommon.cc
View file @
0d4af829
...
...
@@ -41,6 +41,7 @@ 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
;
int
Params
::
expect_matches
=
-
1
;
Format
Params
::
input_format
=
Format
::
AUTO
;
Format
Params
::
output_format
=
Format
::
AUTO
;
...
...
src/wmcommon.hh
View file @
0d4af829
...
...
@@ -71,6 +71,7 @@ public:
static
bool
test_no_sync
;
static
bool
test_no_limiter
;
static
int
test_truncate
;
static
int
expect_matches
;
static
Format
input_format
;
static
Format
output_format
;
...
...
src/wmget.cc
View file @
0d4af829
...
...
@@ -639,6 +639,12 @@ decode_and_report (const WavData& wav_data, const vector<int>& orig_bits)
block_decoder
.
print_debug_sync
();
if
(
Params
::
expect_matches
>=
0
)
{
printf
(
"expect_matches %d
\n
"
,
Params
::
expect_matches
);
if
(
match_count
!=
Params
::
expect_matches
)
return
1
;
}
if
(
!
match_count
)
return
1
;
}
...
...
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