From a77ae3beb09f27c068d57d6eaf670746644d6a2a Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 30 Oct 2023 16:59:28 +0100 Subject: [PATCH] example/le_audio_demo_util_sink: fix plc --- example/le_audio_demo_util_sink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/example/le_audio_demo_util_sink.c b/example/le_audio_demo_util_sink.c index bb87848cc..617fc61d4 100644 --- a/example/le_audio_demo_util_sink.c +++ b/example/le_audio_demo_util_sink.c @@ -214,6 +214,7 @@ static void plc_do(uint8_t stream_index) { (void) lc3_decoder->decode_signed_16(decoder_contexts[effective_channel], NULL, BFI, &pcm[effective_channel], le_audio_demo_sink_num_channels, &tmp_BEC_detect); + have_pcm[i] = true; } // and store in ringbuffer when PCM for all channels is available store_samples_in_ringbuffer(); @@ -240,9 +241,12 @@ static void plc_check(uint16_t packet_sequence_number) { continue; } - // missing packet if big sequence counter is higher than bis sequence counter + // missing packet if group sequence counter is higher than stream sequence counter if (btstack_time16_delta(group_last_packet_sequence, stream_last_packet_sequence[i]) > 0) { printf_plc("- ISO #%u, PLC for %u\n", i, group_last_packet_sequence); +#ifndef DEBUG_PLC + log_info("PLC for packet 0x%04x, stream #%u", group_last_packet_sequence, i); +#endif plc_do(i); btstack_assert((stream_last_packet_sequence[i] + 1) == group_last_packet_sequence); stream_last_packet_sequence[i] = group_last_packet_sequence;