Skip to content

medialink: a listener catches up after a late burst instead of staying late - #358

Merged
bdbarnett merged 1 commit into
mainfrom
fix/medialink-late-sound
Oct 30, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
fix/medialink-late-sound

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

Sound arrives as fast as it plays, so whatever a late burst leaves queued at
the speaker stays for the rest of the turn, and each hiccup made every word
after it later, up to the speaker's buffer limit. When the queue hasn't come
down to the prebuffer for catch_up_ms (2 s), the intercom now skips enough
frames to get back to target_ms, and counts them in stats['trimmed'].

Measured end to end between two ESP32-P4 boards by sending a burst and
hearing it come back from the far speaker: sound alone 500 ms late before,
175-185 ms after; sound to a board sending pictures 385-445 ms before,
185-345 ms (median about 220) after.

…g late

Sound arrives as fast as it plays, so whatever a late burst leaves queued at
the speaker stays for the rest of the turn, and each hiccup made every word
after it later, up to the speaker's buffer limit. When the queue hasn't come
down to the prebuffer for catch_up_ms (2 s), the intercom now skips enough
frames to get back to target_ms, and counts them in stats['trimmed'].

Measured end to end between two ESP32-P4 boards by sending a burst and
hearing it come back from the far speaker: sound alone 500 ms late before,
175-185 ms after; sound to a board sending pictures 385-445 ms before,
185-345 ms (median about 220) after.
@bdbarnett
bdbarnett merged commit 8dc03da into main Oct 30, 2026
9 checks passed
@bdbarnett
bdbarnett deleted the fix/medialink-late-sound branch October 30, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant