I have the following code:
Code: Select all
// stft.h
#include "xmath/xmath.h"
typedef struct {
exponent_t exponent;
headroom_t headroom;
} stft_state_t;
int stft(int64_t stft_output[], int samples[], stft_state_t *p_state);
Code: Select all
// stft.c
#include "stft.h"
int stft(int64_t stft_output[], int samples[], stft_state_t *p_state) {
// Implementation
}
Code: Select all
// inferencer.cpp
#include "stft.h"
const int tone[1024] = { ... };
void calculate_stft(int32_t input[], int32_t output[]) {
stft_state_t stft_state;
int64_t stft_data[256];
stft(stft_data, (int *)tone, &stft_state);
}
I must have tunnel vision because I can't see what's wrong with the code. The only thing I have been able to figure out is that the code compiles fine if I comment out this line:
Code: Select all
stft(stft_data, (int *)tone, &stft_state);
What is wrong with my code?