From 1e4fedb96f14d4d5669f88925550b39fc58caadd Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 6 Oct 2022 15:57:31 +0200 Subject: [PATCH] test/le_audio: fix lc3plus wrapper --- test/le_audio/btstack_lc3plus_fraunhofer.c | 6 +++--- test/le_audio/btstack_lc3plus_fraunhofer.h | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/test/le_audio/btstack_lc3plus_fraunhofer.c b/test/le_audio/btstack_lc3plus_fraunhofer.c index 215bb3b03..5a9b1e6f1 100644 --- a/test/le_audio/btstack_lc3plus_fraunhofer.c +++ b/test/le_audio/btstack_lc3plus_fraunhofer.c @@ -72,7 +72,7 @@ static uint8_t lc3plus_fraunhofer_decoder_configure(void * context, uint32_t sam // store config instance->sample_rate = sample_rate; instance->frame_duration = frame_duration; - instance->octetes_per_frame = octets_per_frame; + instance->octets_per_frame = octets_per_frame; LC3PLUS_Error error; error = lc3plus_dec_init(decoder, sample_rate, 1, LC3PLUS_PLC_ADVANCED, 0); @@ -93,7 +93,7 @@ static uint8_t lc3plus_fraunhofer_decoder_decode_signed_16(void * context, const output_samples[0] = pcm_out; // trigger plc if BFI by passing 0 valid input bytes - uint16_t byte_count = instance->octetes_per_frame; + uint16_t byte_count = instance->octets_per_frame; if (BFI != 0){ byte_count = 0; } @@ -123,7 +123,7 @@ static uint8_t lc3plus_fraunhofer_decoder_decode_signed_24(void * context, const output_samples[0] = pcm_out; // trigger plc if BFI by passing 0 valid input bytes - uint16_t byte_count = instance->octetes_per_frame; + uint16_t byte_count = instance->octets_per_frame; if (BFI != 0){ byte_count = 0; } diff --git a/test/le_audio/btstack_lc3plus_fraunhofer.h b/test/le_audio/btstack_lc3plus_fraunhofer.h index cc82350eb..c35c48f65 100644 --- a/test/le_audio/btstack_lc3plus_fraunhofer.h +++ b/test/le_audio/btstack_lc3plus_fraunhofer.h @@ -51,16 +51,18 @@ extern "C" { /* API_START */ typedef struct { - uint32_t sample_rate; btstack_lc3_frame_duration_t frame_duration; - uint16_t octetes_per_frame; + uint16_t octets_per_frame; + uint32_t sample_rate; + // decoder must be 4-byte aligned uint8_t decoder[LC3PLUS_DEC_MAX_SIZE]; } btstack_lc3plus_fraunhofer_decoder_t; typedef struct { - uint32_t sample_rate; btstack_lc3_frame_duration_t frame_duration; - uint16_t octetes_per_frame; + uint16_t octets_per_frame; + uint32_t sample_rate; + // encoder must be 4-byte aligned uint8_t encoder[LC3PLUS_ENC_MAX_SIZE]; } btstack_lc3plus_fraunhofer_encoder_t;