Skip to content
Permalink
Browse files

test/hfp: handle plc of sco frames with 120 samples

  • Loading branch information...
mringwal committed Mar 8, 2019
1 parent 0d719a1 commit 163d9175bb56283254976950f96ab807fd973345
Showing with 10 additions and 4 deletions.
  1. +10 −4 test/hfp/pklg_cvsd_test.c
@@ -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);
}
}

0 comments on commit 163d917

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.