mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-03 23:47:08 +00:00
test/hfp: handle plc of sco frames with 120 samples
This commit is contained in:
parent
0d719a1e32
commit
163d9175bb
@ -157,12 +157,18 @@ static void process_file(const char * pklg_path, const char * wav_path, int pack
|
||||
}
|
||||
|
||||
if (plc_enabled){
|
||||
btstack_cvsd_plc_process_data(&plc_state, audio_frame_in, num_samples, audio_frame_out);
|
||||
if (num_samples > 60){
|
||||
btstack_cvsd_plc_process_data(&plc_state, 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);
|
||||
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);
|
||||
wav_writer_write_int16(num_samples, audio_frame_out);
|
||||
}
|
||||
} else {
|
||||
memcpy(audio_frame_out, audio_frame_in, audio_bytes_read);
|
||||
wav_writer_write_int16(num_samples, audio_frame_in);
|
||||
}
|
||||
|
||||
wav_writer_write_int16(num_samples, audio_frame_out);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user