Files
voice-cat/docs/broadcast-ring-format.md
Talon 9fc5598e8e
.NET port / test (macos-latest) (push) Canceled after 0s
.NET port / test (ubuntu-24.04) (push) Canceled after 0s
.NET port / test (windows-latest) (push) Canceled after 0s
.NET port / apple-client (push) Canceled after 0s
.NET port / cpp-conformance (push) Canceled after 0s
Bring managed iOS client to feature parity
2026-09-19 19:33:10 +02:00

25 lines
1.3 KiB
Markdown

# iOS broadcast-audio ring format
The ReplayKit extension or iOS 27 ScreenCaptureKit host producer exchanges audio with the
managed host consumer through `broadcast_audio.ring` in the `group.me.iamtalon.voicecat` App
Group. Only one producer is active at a time. Version 1 is a 64-byte little-endian header
followed by 96,000 signed 16-bit PCM samples (one second of stereo at 48 kHz).
| Offset | Type | Meaning |
|---:|---|---|
| 0 | `uint32` | Magic `0x56434252` (`VCBR`) |
| 4 | `uint32` | Version, currently `1` |
| 8 | `uint32` | Channel count; active writers use `2` |
| 12 | `uint32` | Sample rate; active writers use `48000` |
| 16 | `uint32` | Active flag (`0` or `1`) |
| 20 | 4 bytes | Reserved, zero |
| 24 | `uint64` | Monotonic producer/write sample index |
| 32 | `uint64` | Monotonic consumer/read sample index |
| 40 | 24 bytes | Reserved, zero |
The payload starts at byte 64 and contains interleaved little-endian `int16` PCM. The aligned
indices are single-producer/single-consumer counters; producer and consumer publish their owned
index with a release barrier and read the other index with an acquire barrier. A writer drops a
whole input chunk when it cannot fit. Changing this layout requires a new version and compatible
readers; offsets in version 1 must never be repurposed.