using macro define

dev
xufuji456 3 years ago
parent 8f700cca1a
commit a6381fcfc6
  1. 20
      app/src/main/cpp/visualizer/execute_fft.cpp

@ -202,11 +202,11 @@ int init_visualizer(filter_sys_t *p_filter)
p_filter->data = nullptr;
p_filter->data_size = 0;
p_filter->nb_samples = 0;
if (FIXED_FFT) {
p_filter->out_samples = 1 << 9;
} else {
p_filter->out_samples = FFT_BUFFER_SIZE;
}
#ifdef FIXED_FFT
p_filter->out_samples = 512;
#else
p_filter->out_samples = FFT_BUFFER_SIZE;
#endif
p_filter->output = (int8_t *) (malloc(p_filter->out_samples * sizeof(int8_t)));
return 0;
}
@ -386,9 +386,9 @@ release:
void fft_once(filter_sys_t *p_sys)
{
if (FIXED_FFT) {
fft_fixed(p_sys);
} else {
fft_float(p_sys);
}
#ifdef FIXED_FFT
fft_fixed(p_sys);
#else
fft_float(p_sys);
#endif
}

Loading…
Cancel
Save