diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 4edbec1..8088e62 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -35,8 +35,9 @@ add_library( # Sets the name of the library. src/main/cpp/fast_start.c src/main/cpp/ffprobe_cmd.cpp src/main/cpp/visualizer/fft.c + src/main/cpp/visualizer/fixed_fft.c src/main/cpp/visualizer/block_queue.c - src/main/cpp/visualizer/execute_fft.c + src/main/cpp/visualizer/execute_fft.c src/main/cpp/visualizer/window.c ) diff --git a/app/src/main/cpp/visualizer/execute_fft.c b/app/src/main/cpp/visualizer/execute_fft.c index e7b4e51..54dbe45 100644 --- a/app/src/main/cpp/visualizer/execute_fft.c +++ b/app/src/main/cpp/visualizer/execute_fft.c @@ -23,9 +23,6 @@ int open_visualizer(filter_sys_t *p_sys) p_sys->i_prev_nb_samples = 0; p_sys->p_prev_s16_buff = NULL; - p_sys->f_rotationAngle = 0; - p_sys->f_rotationIncrement = ROTATION_INCREMENT; - window_param *w_param = (window_param*) malloc(sizeof(window_param)); p_sys->wind_param = *w_param; diff --git a/app/src/main/cpp/visualizer/execute_fft.h b/app/src/main/cpp/visualizer/execute_fft.h index 1ab582b..e1c7940 100644 --- a/app/src/main/cpp/visualizer/execute_fft.h +++ b/app/src/main/cpp/visualizer/execute_fft.h @@ -16,30 +16,23 @@ extern "C" { #include "fft.h" #include "window.h" -#ifdef __cplusplus -} -#endif - typedef struct { -pthread_t thread; -vlc_queue_t queue; -bool dead; -int i_channels; -int i_prev_nb_samples; -int16_t *p_prev_s16_buff; - -float f_rotationAngle; -float f_rotationIncrement; - -/* FFT window parameters */ -window_param wind_param; - -uint8_t *data; -int data_size; -int nb_samples; -int8_t *output; -int out_samples; + pthread_t thread; + vlc_queue_t queue; + bool dead; + int i_channels; + int i_prev_nb_samples; + int16_t *p_prev_s16_buff; + + /* FFT window parameters */ + window_param wind_param; + + uint8_t *data; + int data_size; + int nb_samples; + int8_t *output; + int out_samples; } filter_sys_t; static void *fft_thread(void *); @@ -58,4 +51,8 @@ void release_visualizer(filter_sys_t *p_sys); int ensure_memory(filter_sys_t *fft_filter, int nb_samples); +#ifdef __cplusplus +} +#endif + #endif //EXECUTE_FFT_H