Skip to content

Commit 91b08a0

Browse files
author
xufulong
committed
change to cpp file
1 parent 074787e commit 91b08a0

5 files changed

Lines changed: 7 additions & 8 deletions

File tree

‎app/CMakeLists.txt‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ add_library( # Sets the name of the library.
3434
src/main/cpp/video_filter.c
3535
src/main/cpp/fast_start.c
3636
src/main/cpp/ffprobe_cmd.cpp
37-
src/main/cpp/visualizer/fft.c
38-
src/main/cpp/visualizer/fixed_fft.c
37+
src/main/cpp/visualizer/fft.cpp
3938
src/main/cpp/visualizer/block_queue.c
40-
src/main/cpp/visualizer/execute_fft.c
41-
src/main/cpp/visualizer/window.c
39+
src/main/cpp/visualizer/execute_fft.cpp
40+
src/main/cpp/visualizer/window.cpp
4241
)
4342

4443
add_library( ffmpeg
File renamed without changes.

‎app/src/main/cpp/visualizer/execute_fft.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
#include <math.h>
99
#include <unistd.h>
10+
#include "fft.h"
11+
#include "window.h"
1012

1113
#ifdef __cplusplus
1214
extern "C" {
1315
#endif
1416

1517
#include "block_queue.h"
16-
#include "fft.h"
17-
#include "window.h"
1818

1919
typedef struct
2020
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fft_state *visual_fft_init(void)
5959
fft_state *p_state;
6060
unsigned int i;
6161

62-
p_state = malloc( sizeof(*p_state) );
62+
p_state = (fft_state *) malloc( sizeof(*p_state) );
6363
if(! p_state )
6464
return NULL;
6565

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ void window_get_param(window_param * p_param)
113113
bool window_init(int i_buffer_size, window_param * p_param, window_context * p_ctx)
114114
{
115115
float * pf_table = NULL;
116+
int i_buffer_size_minus_1 = i_buffer_size - 1;
116117
window_type wind_type = p_param->wind_type;
117118

118119
if( wind_type != HANN && wind_type != FLATTOP
@@ -131,7 +132,6 @@ bool window_init(int i_buffer_size, window_param * p_param, window_context * p_c
131132
return false;
132133
}
133134

134-
int i_buffer_size_minus_1 = i_buffer_size - 1;
135135
switch( wind_type )
136136
{
137137
case HANN:

0 commit comments

Comments
 (0)