test/le_audio: fix lc3plus wrapper

This commit is contained in:
Matthias Ringwald 2022-10-06 15:57:31 +02:00
parent 109dd0804b
commit 1e4fedb96f
2 changed files with 9 additions and 7 deletions

View File

@ -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;
}

View File

@ -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;