forked from cpuimage/AudioDenoise
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfft.h
More file actions
56 lines (41 loc) · 1.07 KB
/
fft.h
File metadata and controls
56 lines (41 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//-----------------------------------------------------------------------------
#ifndef _FFT_H_
#define _FFT_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <math.h>
#include <stdlib.h>
#define FFT_FORWARD 1
#define FFT_BACKWARD 2
#define FFT_ESTIMATE 3
typedef struct {
float real;
float imag;
} fft_complex;
typedef struct {
int n;
int sign;
unsigned int flags;
fft_complex *c_in;
float *in;
fft_complex *c_out;
float *out;
float *input;
int *ip;
float *w;
} fft_plan;
fft_plan fft_plan_dft_1d(size_t n, fft_complex *in, fft_complex *out, int sign,
unsigned int flags);
fft_plan fft_plan_dft_c2r_1d(size_t n, fft_complex *in, float *out,
unsigned int flags);
fft_plan fft_plan_dft_r2c_1d(size_t n, float *in, fft_complex *out,
unsigned int flags);
void fft_execute(fft_plan p);
void fft_destroy_plan(fft_plan p);
#ifdef __cplusplus
}
#endif
#endif
//-----------------------------------------------------------------------------