[client/idd] network: discard stale audio after stalls

Keep PCM and its clock sample in cancellable datagrams so recovery
cannot replay audio buffered before a Wi-Fi stall.

Drop blocked real-time packets with an explicit discontinuity and make
a newer reconnect supersede stale audio authorities.
This commit is contained in:
Geoffrey McRae
2026-10-08 22:51:47 +11:00
parent b1dda92f09
commit 0b0f227c08
11 changed files with 341 additions and 700 deletions

View File

@@ -116,10 +116,11 @@ typedef struct LG_AudioEventOps
uint8_t channels, const uint16_t volume[]);
void (*playbackMute)(void * opaque, uint32_t generation, bool mute);
/* Sample data is borrowed for the duration of the call. When supplied, the
* source clock position and time identify the first frame in this packet. */
* source clock position and time identify the first frame in this packet.
* Discontinuity remains valid when no source clock is available. */
void (*playbackData)(void * opaque, uint32_t generation,
const void * data, size_t frames,
const LG_AudioClock * sourceClock);
const LG_AudioClock * sourceClock, bool discontinuity);
/* May repeat with the same generation to update an active stream format. */
void (*recordStart)(void * opaque, uint32_t generation,