Skip to content

Deregister the calibration tap and filter it from client lists; versionCode 12 - #2

Merged
guerman5 merged 2 commits into
settings-container-convergencefrom
calibration-tap-cleanup
Aug 25, 2026
Merged

guerman5 merged 2 commits into
settings-container-convergencefrom
calibration-tap-cleanup

Conversation

@guerman5

Copy link
Copy Markdown
Contributor

Based on settings-container-convergence (#1), so this shows only its own commits. Merge that first.

A client-side calibration starts a second, silent snapclient for its reference PCM. Killing that process was never enough: snapserver keeps disconnected clients with their last-known values — the calibration's own read-back depends on it — so every run left the tap registered for ever under a fresh random id.

The rig had collected 14 orphan clients across 15 groups, one per calibration ever run, inflating Server.GetStatus from 2.9 KB to 9.4 KB. Server.DeleteClient was implemented and had no caller anywhere.

What this does

  • Wires capullo-audio ba1ff9a's deregister hook: Server.DeleteClient once the tap process is gone, after a 1.5 s grace so snapserver has registered the disconnect.
  • Filters the tap at both points where a server status arrives, rather than at the six places that consume the list. It is a connected client but not a speaker, so the control sheet, the connected-device count and reset-all all want it gone.

Rig-verified on the OPPO, two consecutive runs

run 1 run 2
tap id qctap-47d7d02b qctap-47d7d02b
outcome already aligned (Δ-16ms) already aligned (Δ-7ms)
orphans left 0 0

Same id both runs (the id is now derived per-device, not random), and zero orphans where before there would have been two. No "Client not found" in either log, so the double-stop guard holds.

The filter was proven by A/B rather than by absence: mid-run, on one server at one instant, the unfiltered build showed 3 client cards and the filtered build 2. The third is the tap.

…onCode 11

Wires the deregister hook capullo-audio added: after the tap process is killed,
Server.DeleteClient removes it from the server, 1.5 s later so snapserver has
registered the disconnect first. Without this every client-side calibration left
a permanent phantom client behind.

Filters the tap at both points where a server status arrives, rather than at the
six places that consume the list. It is a connected client but not a speaker, so
the control sheet, the connected-device count and reset-all all want it gone.
@guerman5
guerman5 merged commit fc409e1 into settings-container-convergence Aug 25, 2026
1 check passed
@guerman5
guerman5 deleted the calibration-tap-cleanup branch August 25, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant