From bfd38b1766b323848bfd5896d783fafdbd15a16b Mon Sep 17 00:00:00 2001 From: ZoRo Date: Fri, 23 Jul 2021 19:52:29 +0100 Subject: Fixed on Linux --- WasmAudio/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'WasmAudio') diff --git a/WasmAudio/main.c b/WasmAudio/main.c index e3c094b..c8a5191 100644 --- a/WasmAudio/main.c +++ b/WasmAudio/main.c @@ -67,9 +67,9 @@ int current_state=0; int audio_rec_buffer_size=-1; int audio_rec_buffer_max_size=-1; static uint8_t audio_rec_buffer_[BUFSIZE]; -const int process_buf_size = BUFSIZE4; -static double process_buf[process_buf_size+100]; -static double process_buf2[process_buf_size+100]; +#define PROCESS_BUF_SIZE (BUFSIZE4) +static double process_buf[PROCESS_BUF_SIZE+100]; +static double process_buf2[PROCESS_BUF_SIZE+100]; uint8_t *audio_rec_buffer=NULL; FILE *f_1,*f_2; @@ -288,8 +288,8 @@ int main_tick() { //fir filter apply #if 1 - fir_filter(&fir_lp, process_buf, process_buf_size, process_buf2, process_buf_size); - memcpy(process_buf,process_buf2,process_buf_size*sizeof(double)); + fir_filter(&fir_lp, process_buf, PROCESS_BUF_SIZE, process_buf2, PROCESS_BUF_SIZE); + memcpy(process_buf,process_buf2,PROCESS_BUF_SIZE*sizeof(double)); save_to_matlab("B2"); #endif convert_double_to_f32(); -- cgit v1.2.3