mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-23 19:20:51 +00:00
test/hfp: fix compile
This commit is contained in:
parent
1a551b1b77
commit
4795fc1ab4
@ -35,6 +35,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WAV_UIL_H
|
||||
#define WAV_UIL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -42,6 +45,10 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// return 0 if ok
|
||||
|
||||
/**
|
||||
@ -92,3 +99,8 @@ int wav_reader_read_int16(int num_samples, int16_t * data);
|
||||
*/
|
||||
int wav_reader_close(void);
|
||||
|
||||
#if defined __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // WAV_UTIL_H
|
||||
|
@ -161,7 +161,7 @@ static void process_wav_file_with_plc(const char * in_filename, const char * out
|
||||
|
||||
while (wav_reader_read_int16(audio_samples_per_frame, audio_frame_in) == 0){
|
||||
int16_t audio_frame_out[audio_samples_per_frame];
|
||||
btstack_cvsd_plc_process_data(&plc_state, audio_frame_in, audio_samples_per_frame, audio_frame_out);
|
||||
btstack_cvsd_plc_process_data(&plc_state, false, audio_frame_in, audio_samples_per_frame, audio_frame_out);
|
||||
wav_writer_write_int16(audio_samples_per_frame, audio_frame_out);
|
||||
}
|
||||
wav_reader_close();
|
||||
|
@ -158,12 +158,12 @@ static void process_file(const char * pklg_path, const char * wav_path, int pack
|
||||
|
||||
if (plc_enabled){
|
||||
if (num_samples > 60){
|
||||
btstack_cvsd_plc_process_data(&plc_state, audio_frame_in, 60, audio_frame_out);
|
||||
btstack_cvsd_plc_process_data(&plc_state, false, audio_frame_in, 60, audio_frame_out);
|
||||
wav_writer_write_int16(60, audio_frame_out);
|
||||
btstack_cvsd_plc_process_data(&plc_state, &audio_frame_in[60], num_samples - 60, audio_frame_out);
|
||||
btstack_cvsd_plc_process_data(&plc_state, false, &audio_frame_in[60], num_samples - 60, audio_frame_out);
|
||||
wav_writer_write_int16(num_samples - 60, audio_frame_out);
|
||||
} else {
|
||||
btstack_cvsd_plc_process_data(&plc_state, audio_frame_in, num_samples, audio_frame_out);
|
||||
btstack_cvsd_plc_process_data(&plc_state, false, audio_frame_in, num_samples, audio_frame_out);
|
||||
wav_writer_write_int16(num_samples, audio_frame_out);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user