|
|
@ -228,7 +228,10 @@ void release_visualizer(filter_sys_t *p_filter) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int ensure_memory(filter_sys_t *fft_filter, int nb_samples) { |
|
|
|
int ensure_memory(filter_sys_t *fft_filter, int nb_samples) { |
|
|
|
if (nb_samples != fft_filter->nb_samples && nb_samples >= MIN_FFT_SIZE) { |
|
|
|
if (nb_samples < MIN_FFT_SIZE) { |
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (nb_samples != fft_filter->nb_samples) { |
|
|
|
if (!fft_filter->data) { |
|
|
|
if (!fft_filter->data) { |
|
|
|
fft_filter->data_size = nb_samples; |
|
|
|
fft_filter->data_size = nb_samples; |
|
|
|
fft_filter->data = (uint8_t *) (malloc(nb_samples * sizeof(uint8_t))); |
|
|
|
fft_filter->data = (uint8_t *) (malloc(nb_samples * sizeof(uint8_t))); |
|
|
|