btstack_lc3plus_fraunhofer: store samples per frame in decoder

This commit is contained in:
Matthias Ringwald 2023-07-10 12:12:38 +02:00
parent bbdb580012
commit 021ff6c00b
2 changed files with 2 additions and 0 deletions

View File

@ -73,6 +73,7 @@ static uint8_t lc3plus_fraunhofer_decoder_configure(void * context, uint32_t sam
instance->sample_rate = sample_rate;
instance->frame_duration = frame_duration;
instance->octets_per_frame = octets_per_frame;
instance->samples_per_frame = btstack_lc3_samples_per_frame(sample_rate, frame_duration);
LC3PLUS_Error error;
error = lc3plus_dec_init(decoder, sample_rate, 1, LC3PLUS_PLC_ADVANCED, 0);

View File

@ -53,6 +53,7 @@ extern "C" {
typedef struct {
btstack_lc3_frame_duration_t frame_duration;
uint16_t octets_per_frame;
uint16_t samples_per_frame;
uint32_t sample_rate;
// decoder must be 4-byte aligned
uint8_t decoder[LC3PLUS_DEC_MAX_SIZE];