PROTOCOL NOTES / 08

Bridge mixing

Carry one stream across a Bluetooth LE edge, whoever is speaking.

Implemented software · Tested on hosts and emulators only · Physical qualification pending

One stream per direction

A Bluetooth LE link in an active forwarding role is a Bluetooth LE edge, and each endpoint is the bridge for its direction. Over the edge a bridge sends exactly one media source: its mix for that edge. It never forwards individual voices, mixes from elsewhere or its own voice source across it. Wi-Fi Aware edges keep forwarding separate encrypted voices unchanged.

A constant single stream keeps the edge’s bandwidth independent of the number of speakers. Spike measurements showed separate voices collapsing on a phone in a headset call while one mixed stream stayed clean.

Bridge mixing is implemented software, tested on hosts only. The acoustic quality of mixed speech and physical latency are unqualified.

A mix is a source of its own

A bridge owns one mix source per Bluetooth LE neighbor for the whole ride, with a fresh SRTP key and SSRC that are never derived from its voice source. It publishes the descriptor as an ordinary signed stream message with kind:"mix" and an edge that names the neighbor, so the keys reach the far side before the edge activates. If a link to the same neighbor forms again, the same mix source is reused. Mix descriptors are not a prerequisite for starting audio.

Never send a voice back where it came from

Toward neighbor B over edge E, bridge A mixes its own capture; every remote voice it plays except B’s and those received over E; and every mix frame it plays that was not received over E, has no speaker bit for B, and lists neither A nor B as a mixer. A’s own voice enters through a five-frame delay line and only for frames its voice encoder transmitted, so the soft onsets that pre-roll preserves are kept.

Every mix adds its bridge to the mixer set, and no bridge mixes a frame that already lists it. A frame is therefore mixed at most once per bridge, and mixes cannot circulate even while a handoff briefly leaves a cycle. A receiver discards a mix frame whose speaker set contains its own index: nobody hears themself.

Playback comes first

The mixer reads the PCM the bridge already decoded for playback and the processed capture frame; it never decodes a source twice. It runs on its own lower-priority worker with non-blocking hand-over, never delays playback, and drops its own frames when late. It sums without per-source gain, limits at −1 dBFS and adds one Opus encode per edge and direction, at a fixed 32 kbit/s.

A mix frame is sent only while its speaker set is nonzero; a mix has no voice detector, pre-roll or hangover of its own. When local output is off, a bridge with an active edge keeps decoding for the mix on a steady 20 ms cadence.

On the far side

A receiver treats a mix as an ordinary source: authenticated, replay-checked, relayed unchanged on Wi-Fi Aware links, jitter-buffered, decoded after the header is stripped, and summed into the output. No mix is forwarded over any Bluetooth LE edge. A rider heard only through a mix is shown speaking from the speaker set.

When a mix contains a rider whose direct voice was also decoded within the last second, the receiver plays both and counts an anomaly: suppressing the mix could silence others heard only through it. Listeners beyond a bridge hear its side later by about the bridge’s playout buffer, the encode and the Bluetooth LE hop.

Parent changes across a bridge

A bridge starts its mix when the link enters an active role and stops it the moment the link leaves that role. Make-before-break stops forwarding on the old edge at the child’s local commit, so a moved rider is heard twice only for frames already queued on the old path, and the mixer-set and own-index rules keep them from echoing. Two Bluetooth LE edges in series re-encode a voice twice; the cost rule and the Wi-Fi Aware preference keep that case rare.

Authority: Bridge mixing; media; DTX. Public examples are synthetic. This guide is maintained against the private implementation; it does not imply access to its source.