| 1 |
#ifndef PITCHSCALE_H |
| 2 |
#define PITCHSCALE_H |
| 3 |
|
| 4 |
#include <config.h> |
| 5 |
|
| 6 |
#ifdef FFTW3 |
| 7 |
|
| 8 |
#include <fftw3.h> |
| 9 |
|
| 10 |
typedef fftwf_plan fft_plan; |
| 11 |
typedef float fftw_real; |
| 12 |
|
| 13 |
#else |
| 14 |
|
| 15 |
#ifdef EXPLICIT_S |
| 16 |
#include <srfftw.h> |
| 17 |
#else |
| 18 |
#include <rfftw.h> |
| 19 |
#endif //EXPLICIT_S |
| 20 |
|
| 21 |
typedef rfftw_plan fft_plan; |
| 22 |
|
| 23 |
#endif //FFTW3 |
| 24 |
|
| 25 |
typedef struct { |
| 26 |
float *gInFIFO; |
| 27 |
float *gOutFIFO; |
| 28 |
float *gLastPhase; |
| 29 |
float *gSumPhase; |
| 30 |
float *gOutputAccum; |
| 31 |
float *gAnaFreq; |
| 32 |
float *gAnaMagn; |
| 33 |
float *gSynFreq; |
| 34 |
float *gSynMagn; |
| 35 |
float *gWindow; |
| 36 |
long gRover; |
| 37 |
} sbuffers; |
| 38 |
|
| 39 |
#define MAX_FRAME_LENGTH 4096 |
| 40 |
|
| 41 |
#define true 1 |
| 42 |
#define false 0 |
| 43 |
|
| 44 |
void pitch_scale(sbuffers *buffers, const double pitchScale, const long |
| 45 |
fftFrameLength, const long osamp, const long numSampsToProcess, |
| 46 |
const double sampleRate, const float *indata, float *outdata, |
| 47 |
const int adding, const float gain); |
| 48 |
|
| 49 |
#endif |