Move our own state out of TeamspeakConnection: OwnClient, Recording

OwnClient owns the microphone and speakers and our flags (mute, deafen,
away, commander, talk request, phonetic nickname, input hardware) and
publishes them; Recording owns the recorder. ServerSession reads the
flags from OwnClient instead of keeping its own copy, and they are now
cleared when a connect starts rather than once it is done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 19:04:01 +00:00
co-authored by Claude Opus 5.5
parent c2090d8122
commit 9107bdd02e
11 changed files with 529 additions and 413 deletions
@@ -105,8 +105,8 @@ class ServerController internal constructor(
val isConnected: Boolean get() = session.isConnected
internal val isBusy: Boolean get() = session.isBusy || network.isRecovering
internal val microphone get() = if (session.isConnected) conn.microphone else null
internal val playback get() = if (session.isConnected) conn.playback else null
internal val microphone get() = if (session.isConnected) conn.ownClient().microphone() else null
internal val playback get() = if (session.isConnected) conn.ownClient().playback() else null
/** Not on the server and not trying to get back on it: done with. */
internal val ended: Boolean get() = started && !isBusy