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

Loading…
Cancel
Save