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
9c30e309
Commit
9c30e309
authored
Jan 30, 2019
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly support different fft sizes.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
4d02104d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
fft.cc
src/fft.cc
+7
-2
No files found.
src/fft.cc
View file @
9c30e309
...
...
@@ -2,8 +2,11 @@
#include <fftw3.h>
#include <map>
using
std
::
vector
;
using
std
::
complex
;
using
std
::
map
;
float
*
new_array_float
(
size_t
N
)
...
...
@@ -22,8 +25,9 @@ free_array_float (float *f)
void
fftar_float
(
size_t
N
,
float
*
in
,
float
*
out
)
{
static
fftwf_plan
plan
=
nullptr
;
// FIXME: should be one plan per fft size
static
map
<
int
,
fftwf_plan
>
plan_for_size
;
fftwf_plan
&
plan
=
plan_for_size
[
N
];
if
(
!
plan
)
{
float
*
plan_in
=
new_array_float
(
N
);
...
...
@@ -38,8 +42,9 @@ fftar_float (size_t N, float *in, float *out)
void
fftsr_float
(
size_t
N
,
float
*
in
,
float
*
out
)
{
static
fftwf_plan
plan
=
nullptr
;
// FIXME: should be one plan per fft size
static
map
<
int
,
fftwf_plan
>
plan_for_size
;
fftwf_plan
&
plan
=
plan_for_size
[
N
];
if
(
!
plan
)
{
float
*
plan_in
=
new_array_float
(
N
);
...
...
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