define MIN_FFT_SIZE

dev
xufulong 3 years ago
parent 9f4c92d096
commit f9e680bce8
  1. 2
      app/src/main/cpp/visualizer/execute_fft.cpp
  2. 2
      app/src/main/cpp/visualizer/execute_fft.h

@ -224,7 +224,7 @@ void release_visualizer(filter_sys_t *p_filter)
}
int ensure_memory(filter_sys_t *fft_filter, int nb_samples) {
if (nb_samples != fft_filter->nb_samples && nb_samples > fft_filter->out_samples) {
if (nb_samples != fft_filter->nb_samples && nb_samples >= MIN_FFT_SIZE) {
if (!fft_filter->data) {
fft_filter->data_size = nb_samples;
fft_filter->data = (uint8_t *) (malloc(nb_samples * sizeof(uint8_t)));

@ -17,6 +17,8 @@ extern "C" {
#include "block_queue.h"
#define MIN_FFT_SIZE 128
typedef struct
{
pthread_t thread;

Loading…
Cancel
Save