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
fa259ba4
Commit
fa259ba4
authored
Dec 11, 2019
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print raw input/output format.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
09456e28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
TODO
src/TODO
+0
-1
wmadd.cc
src/wmadd.cc
+13
-0
No files found.
src/TODO
View file @
fa259ba4
...
...
@@ -9,7 +9,6 @@ streaming:
- stdio error handling
- document in README
- final documentation
- print raw format
- --snr
- --quiet
- ab init lazy
src/wmadd.cc
View file @
fa259ba4
...
...
@@ -534,6 +534,15 @@ public:
}
};
void
info_format
(
const
string
&
label
,
const
RawFormat
&
format
)
{
info
(
"%-13s %d Hz, %d Channels, %d Bit (%s %s-endian)
\n
"
,
(
label
+
":"
).
c_str
(),
format
.
sample_rate
(),
format
.
n_channels
(),
format
.
bit_depth
(),
format
.
encoding
()
==
RawFormat
::
Encoding
::
SIGNED
?
"signed"
:
"unsigned"
,
format
.
endian
()
==
RawFormat
::
Endian
::
LITTLE
?
"little"
:
"big"
);
}
int
add_watermark
(
const
string
&
infile
,
const
string
&
outfile
,
const
string
&
bits
)
{
...
...
@@ -557,7 +566,11 @@ add_watermark (const string& infile, const string& outfile, const string& bits)
bitvec
=
expanded_bitvec
;
}
info
(
"Input: %s
\n
"
,
infile
.
c_str
());
if
(
Params
::
input_format
==
Format
::
RAW
)
info_format
(
"Raw Input"
,
Params
::
raw_input_format
);
info
(
"Output: %s
\n
"
,
outfile
.
c_str
());
if
(
Params
::
output_format
==
Format
::
RAW
)
info_format
(
"Raw Output"
,
Params
::
raw_output_format
);
info
(
"Message: %s
\n
"
,
bit_vec_to_str
(
bitvec
).
c_str
());
info
(
"Strength: %.6g
\n\n
"
,
Params
::
water_delta
*
1000
);
...
...
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