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
b0c51b6d
Commit
b0c51b6d
authored
Nov 19, 2019
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More sync_fft cleanups.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
0db0d742
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
audiowmark.cc
src/audiowmark.cc
+6
-17
No files found.
src/audiowmark.cc
View file @
b0c51b6d
...
...
@@ -1300,31 +1300,20 @@ private:
for
(
size_t
f
=
0
;
f
<
frame_count
;
f
++
)
{
const
double
min_db
=
-
96
;
if
(
want_frames
.
size
()
&&
!
want_frames
[
f
])
{
for
(
int
ch
=
0
;
ch
<
wav_data
.
n_channels
();
ch
++
)
fft_out
.
push_back
({});
}
else
{
vector
<
vector
<
complex
<
float
>>>
frame_result
=
fft_analyzer
.
run_fft
(
samples
,
index
+
f
*
Params
::
frame_size
);
for
(
auto
&
fr
:
frame_result
)
fft_out
.
emplace_back
(
std
::
move
(
fr
));
}
}
for
(
size_t
p
=
0
;
p
<
fft_out
.
size
();
p
++
)
{
const
double
min_db
=
-
96
;
if
(
!
fft_out
[
p
].
size
())
// not in want_frames?
{
for
(
int
i
=
Params
::
min_band
;
i
<=
Params
::
max_band
;
i
++
)
fft_out_db
.
push_back
(
min_db
);
}
else
{
vector
<
vector
<
complex
<
float
>>>
frame_result
=
fft_analyzer
.
run_fft
(
samples
,
index
+
f
*
Params
::
frame_size
);
for
(
int
ch
=
0
;
ch
<
wav_data
.
n_channels
();
ch
++
)
for
(
int
i
=
Params
::
min_band
;
i
<=
Params
::
max_band
;
i
++
)
fft_out_db
.
push_back
(
db_from_factor
(
abs
(
fft_out
[
p
][
i
]),
min_db
));
fft_out_db
.
push_back
(
db_from_factor
(
abs
(
frame_result
[
ch
][
i
]),
min_db
));
}
}
}
...
...
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