btstack_sbc: btstack_sbc_decoder_test_set_plc_enabled to enable/disable PLC for testing

This commit is contained in:
Matthias Ringwald 2018-12-19 14:58:32 +01:00
parent 23ea0393db
commit 9137e11839
4 changed files with 5 additions and 5 deletions

View File

@ -153,7 +153,7 @@ int btstack_sbc_encoder_num_audio_frames(void);
/* API_END */
// testing only
void btstack_sbc_decoder_test_disable_plc(void);
void btstack_sbc_decoder_test_set_plc_enabled(int plc_enabled);
void btstack_sbc_decoder_test_simulate_corrupt_frames(int period);
#if defined __cplusplus

View File

@ -86,8 +86,8 @@ static int plc_enabled = 1;
static int corrupt_frame_period = -1;
// Testing - STOP
void btstack_sbc_decoder_test_disable_plc(void){
plc_enabled = 0;
void btstack_sbc_decoder_test_set_plc_enabled(int enabled){
plc_enabled = enabled;
}
void btstack_sbc_decoder_test_simulate_corrupt_frames(int period){

View File

@ -87,7 +87,7 @@ int btstack_main (int argc, const char * argv[]){
btstack_sbc_mode_t mode = SBC_MODE_STANDARD;
btstack_sbc_decoder_state_t state;
btstack_sbc_decoder_init(&state, mode, &handle_pcm_data, NULL);
btstack_sbc_decoder_test_disable_plc();
btstack_sbc_decoder_test_set_plc_enabled(0);
uint32_t t_start = btstack_run_loop_get_time_ms();
playback_buffer = 1;
uint32_t offset = 0;

View File

@ -167,7 +167,7 @@ int main (int argc, const char * argv[]){
btstack_sbc_decoder_init(&state, mode, &handle_pcm_data, NULL);
if (!plc_enabled){
btstack_sbc_decoder_test_disable_plc();
btstack_sbc_decoder_test_set_plc_enabled(0);
}
if (corrupt_frame_period > 0){
btstack_sbc_decoder_test_simulate_corrupt_frames(corrupt_frame_period);