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
83225ed9
Commit
83225ed9
authored
Feb 19, 2019
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sync reorder add/get with --linear option.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
cc088f04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
audiowmark.cc
src/audiowmark.cc
+4
-3
No files found.
src/audiowmark.cc
View file @
83225ed9
...
...
@@ -515,7 +515,7 @@ mark_data (const WavData& wav_data, int start_frame, const vector<vector<complex
{
for
(
int
ch
=
0
;
ch
<
wav_data
.
n_channels
();
ch
++
)
{
size_t
index
=
(
start_frame
+
f
)
*
wav_data
.
n_channels
()
+
ch
;
size_t
index
=
(
start_frame
+
data_frame_pos
(
f
)
)
*
wav_data
.
n_channels
()
+
ch
;
mark_bit_linear
(
f
,
fft_out
[
index
],
fft_delta_spect
[
index
],
bitvec
[
f
/
Params
::
frames_per_bit
],
Random
::
Stream
::
data_up_down
);
}
...
...
@@ -907,13 +907,14 @@ linear_decode (vector<vector<complex<float>>>& fft_out, int n_channels)
{
vector
<
float
>
raw_bit_vec
;
const
int
frame_count
=
mark_data_frame_count
();
double
umag
=
0
,
dmag
=
0
;
const
int
frame_count
=
fft_out
.
size
()
/
n_channels
;
for
(
int
f
=
0
;
f
<
frame_count
;
f
++
)
{
for
(
int
ch
=
0
;
ch
<
n_channels
;
ch
++
)
{
const
size_t
index
=
f
*
n_channels
+
ch
;
const
size_t
index
=
data_frame_pos
(
f
)
*
n_channels
+
ch
;
vector
<
int
>
up
;
vector
<
int
>
down
;
get_up_down
(
f
,
up
,
down
,
Random
::
Stream
::
data_up_down
);
...
...
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