mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-15 22:20:59 +00:00
btstack_sbc: btstack_sbc_decoder_test_set_plc_enabled to enable/disable PLC for testing
This commit is contained in:
parent
23ea0393db
commit
9137e11839
@ -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
|
||||
|
@ -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){
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user