Draft v0.3.0
RFC: OAAT
Open Advanced Audio Transport
Version 0.3.0 · Date: 2026-07-04 · Author: Bertrand Clech / Mozaiklabs · License: Apache 2.0
Changes in 0.3.0
FEC is fully specified on the wire (group size, index, length-XOR recovery); FormatAccept now signals device readiness; clock sync is normatively endpoint-initiated with a mandatory controller responder; PTS-scheduled playback start and drift compensation are normative; bit-perfect output path requirements clarified.
Abstract
This document specifies OAAT (Open Advanced Audio Transport), an open-source network audio streaming protocol designed for bit-perfect multi-room audio. OAAT provides the transport, synchronization, and control layers needed to stream high-resolution audio from a server to one or more endpoints on a local network, with sub-millisecond synchronization accuracy.
OAAT is designed to be an open alternative to Roon's proprietary RAAT protocol, while being simpler to implement, free of DRM, and friendly to both hardware manufacturers and open-source software projects.
1. Goals and Non-Goals
1.1 Goals
- Bit-perfect audio transport: PCM data arrives at the DAC identical to the source, with no resampling, dithering, or modification unless explicitly requested by the user.
- Multi-room synchronization: Multiple endpoints play the same audio stream in sync, with perceptible alignment (target: < 1 ms drift between any two endpoints on the same LAN).
- Format negotiation: Server and endpoint agree on the best common format (sample rate, bit depth, channel layout, encoding) without user intervention.
- Open standard: Fully documented, no patents, no certification costs. Apache 2.0 — free for any use, including commercial.
- Rust-first design: Zero-copy semantics, async I/O, no garbage collector dependency. A conforming basic endpoint is implementable in under 2000 lines of Rust.
- Embeddable: Protocol is lightweight enough for resource-constrained devices (Raspberry Pi, ESP32 with external DAC, FPGA-based streamers).
- Coexistence: OAAT endpoints can coexist on the same network as DLNA, AirPlay, Chromecast, and OpenHome devices.
- Low latency: From play-press to sound output in < 200 ms for a single endpoint, < 500 ms for synchronized multi-room.
1.2 Non-Goals
- DRM / content protection: OAAT does not implement any form of digital rights management.
- Internet streaming: OAAT is a LAN protocol. WAN streaming requires fundamentally different approaches.
- Audio processing / DSP: OAAT transports audio. DSP is a server-side concern.
- User interface: OAAT defines no UI. Control is via the wire protocol.
- Replacing USB Audio: OAAT is a network protocol. Direct USB/I2S/SPDIF connections are out of scope.
1.3 Positioning
OAAT occupies the space between "works everywhere but sounds mediocre" (DLNA) and "sounds perfect but costs money and is closed" (RAAT). It aims to be the TCP/IP of high-resolution network audio: boring, reliable, open, and ubiquitous.
2. Architecture
2.1 Roles
OAAT defines two roles:
- Controller (also called "server"): The entity that holds the audio library, manages streaming service connections, performs decoding and optional DSP, and orchestrates playback across endpoints.
- Endpoint (also called "renderer"): The entity that receives audio data over the network and outputs it to a DAC.
2.2 Zones
A Zone is a logical grouping of one or more Endpoints that play the same audio stream in sync. An Endpoint belongs to at most one Zone at any time.
zone.create(endpoint_ids[]) -- create a zone with initial members
zone.add(endpoint_id) -- add an endpoint to an existing zone
zone.remove(endpoint_id) -- remove an endpoint from a zone
zone.destroy() -- dissolve a zone, all endpoints become idle2.3 Session Lifecycle
1. Discovery -- Endpoint announces itself via mDNS
2. Handshake -- Controller connects, capabilities exchanged
3. Idle -- Endpoint awaits commands
4. Negotiation -- Controller proposes format, endpoint accepts/counters
5. Streaming -- Audio data flows, control messages interleaved
6. Paused -- Audio flow suspended, session alive
7. Stopped -- Audio flow terminated, session alive
8. Disconnected -- TCP control connection closed, endpoint returns to IdleState transitions are Controller-initiated except for error conditions and voluntary endpoint departure.
2.4 Connection Model
Each Controller-Endpoint pair maintains:
- One TCP connection for the control channel (persistent, bidirectional)
- One UDP flow for audio data (Controller to Endpoint, unidirectional)
- One UDP flow for clock synchronization (bidirectional)
The TCP connection is the session anchor. If it drops, the Endpoint MUST stop playback within 500 ms and return to Idle.
3. Discovery
3.1 Service Type
OAAT uses DNS-SD (RFC 6763) over mDNS (RFC 6762) for zero-configuration discovery.
Service type: _oaat._tcp
3.2 Endpoint Announcement
Instance: <human-readable name>
Service: _oaat._tcp
Domain: local.
Port: <control port, default 9740>3.3 TXT Records
| Key | Required | Example | Description |
|---|---|---|---|
| v | YES | 1 | OAAT protocol version |
| id | YES | a3f8...c7 | Unique endpoint ID (128-bit, hex) |
| name | YES | Living Room DAC | Human-readable display name |
| model | NO | StreamerX Pro | Hardware model name |
| vendor | NO | Acme Audio | Manufacturer name |
| caps | YES | pcm:768/32,dsd:256 | Compact capability string |
| ch | YES | 2 | Maximum channel count |
| vol | NO | hw | Volume control type |
| fw | NO | 2.1.0 | Firmware/software version |
3.4 Controller Announcement (Optional)
A Controller MAY announce itself for auto-discovery. Service type: _oaat-ctrl._tcp
3.5 Discovery Timing
- Endpoints MUST announce within 2 seconds of boot.
- Controllers MUST browse for
_oaat._tcpcontinuously. - Endpoints MUST respond to unicast queries within 200 ms.
- Goodbye packets (TTL=0) MUST be sent on graceful shutdown.
4. Transport Layer
4.1 Why TCP for Control
The control channel carries session management, playback commands, metadata, zone management, clock sync bootstrapping, and error reporting. These messages are small, infrequent, and require reliable delivery.
4.2 Why UDP for Audio
Audio data is high-bandwidth (stereo 24/192 PCM = 9.2 Mbit/s), latency-sensitive, and tolerant of rare packet loss when buffered adequately. UDP gives the protocol control over packet pacing, buffer management, and avoids head-of-line blocking.
OAAT adds sequence numbers, timestamps, and optional FEC headers — similar to RTP but without the full RTP/RTCP stack overhead.
4.3 Port Allocation
| Channel | Protocol | Default Port | Notes |
|---|---|---|---|
| Control | TCP | 9740 | Announced via mDNS |
| Audio | UDP | 9741 | Communicated during negotiation |
| Clock Sync | UDP | 9742 | Communicated during handshake |
4.4 Network Requirements
- LAN: Gigabit Ethernet or 802.11ac/ax Wi-Fi recommended.
- Multicast: REQUIRED for mDNS discovery. NOT used for audio (unicast only).
- MTU: Standard 1500-byte Ethernet MTU assumed. Jumbo frames supported but not required.
- QoS: Audio UDP packets SHOULD be marked with DSCP EF (0x2E).
5. Audio Streaming
5.1 Supported Formats
| Format | Description | Use Case |
|---|---|---|
| PCM_S16LE | Signed 16-bit LE PCM | CD quality |
| PCM_S24LE | Signed 24-bit LE PCM (packed) | Hi-res |
| PCM_S24LE4 | Signed 24-bit in 32-bit container | Hi-res (aligned) |
| PCM_S32LE | Signed 32-bit LE PCM | Studio |
| PCM_F32LE | 32-bit IEEE float LE | DSP interchange |
| DSD_U8 | DSD raw, 8 per byte, MSB first | DSD64-DSD512 |
| DSD_U16LE | DSD raw, 16-bit words LE | DSD (word-aligned) |
| DSD_U32LE | DSD raw, 32-bit words LE | DSD (dword-aligned) |
| FLAC | FLAC compressed frames | Bandwidth savings |
| OPUS | Opus compressed | Low-bandwidth/preview |
Little-endian is the canonical byte order. Big-endian formats are not supported on the wire.
5.2 Capability String
pcm:<max_rate_khz>/<max_bits>[,dsd:<max_multiplier>][,flac][,opus]
Examples:
pcm:192/24 -- PCM up to 192 kHz / 24-bit
pcm:768/32,dsd:256 -- PCM up to 768/32 and DSD up to DSD256
pcm:96/24,flac -- PCM up to 96/24, accepts FLAC frames5.3 Format Negotiation
During session setup, the Controller sends a FORMAT_PROPOSE message:
{
"type": "format_propose",
"stream_id": "abc123",
"format": "PCM_S24LE",
"sample_rate": 192000,
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 24,
"dsd_rate": null
}The Endpoint responds with FORMAT_ACCEPT, FORMAT_COUNTER, or FORMAT_REJECT. The Controller MUST NOT send audio data until it receives FORMAT_ACCEPT.
Readiness semantics: FORMAT_ACCEPT means the Endpoint is ready to render — its audio device is open and configured for the proposed format, not merely that the format is acceptable. An accept sent before the device is ready silently consumes the Controller's play-delay lead time and defeats PTS-scheduled starts (§6.4). Endpoints SHOULD defer the accept until the device is open, with a bounded fail-open (RECOMMENDED: 5 s) so a stuck device cannot deadlock the negotiation. FORMAT_COUNTER and FORMAT_REJECT involve no device setup and are sent immediately.
Bit-perfect guarantee: When the Endpoint accepts a format, it commits to delivering those exact samples to the DAC with no modification. If the Endpoint needs to resample, it MUST counter-propose the native rate so the Controller can perform the conversion server-side.
Bit-perfection constrains the entire output path, not just the wire:
- The Endpoint MUST buffer and deliver samples in the negotiated format's native representation. Intermediate float normalization is only acceptable when the scaling is a power of two — arbitrary scale factors are not.
- Sample width adaptation MUST be limited to exact operations (e.g. 24-bit samples left-shifted into a 32-bit device slot).
- Software volume at any setting other than unity breaks bit-perfection; endpoints advertising
vol: hworfixedpreserve it. - Lossless compressed transport (FLAC) preserves the guarantee provided decode and delivery follow the rules above.
5.4 Channel Layouts
| Name | Channels | Mapping |
|---|---|---|
| mono | 1 | C |
| stereo | 2 | L, R |
| 2.1 | 3 | L, R, LFE |
| quad | 4 | FL, FR, RL, RR |
| 5.1 | 6 | FL, FR, FC, LFE, RL, RR |
| 7.1 | 8 | FL, FR, FC, LFE, RL, RR, SL, SR |
Stereo is the baseline. All Endpoints MUST support stereo.
5.5 Sample Rate Families
- 44.1 kHz family: 44100, 88200, 176400, 352800, 705600 Hz
- 48 kHz family: 48000, 96000, 192000, 384000, 768000 Hz
When counter-proposing, the Endpoint SHOULD stay within the same family to avoid non-integer resampling artifacts.
5.6 DSD Transport
DSD is transported as raw bitstream data (not DoP):
| Multiplier | Bitstream Rate | Common Name |
|---|---|---|
| 64 | 2.8224 MHz | DSD64 |
| 128 | 5.6448 MHz | DSD128 |
| 256 | 11.2896 MHz | DSD256 |
| 512 | 22.5792 MHz | DSD512 |
5.7 Compressed Transport (FLAC)
- Frames are standard FLAC frames, each self-contained and independently decodable.
- Frame size: 1024-4096 samples (negotiable).
- The Endpoint decodes to PCM locally. Bit-perfection is maintained because FLAC is lossless.
6. Synchronization
6.1 Overview
Multi-room synchronization requires all Endpoints in a Zone to play the same audio sample at the same wall-clock time. This demands a shared clock reference, known/compensated network latency, and sufficient buffer depth.
OAAT uses a PTP-inspired (IEEE 1588) clock synchronization mechanism, simplified for LAN use.
6.2 Clock Sync Protocol
The Controller is the clock master. Clock sync is endpoint-initiated and runs over UDP:
Endpoint Controller
| |
|--- SYNC_REQUEST { t1 } -------->|
| |
|<-- SYNC_RESPONSE { t1,t2,t3 } --|
| |
t4 = local receive time |
Round-trip delay: d = (t4 - t1) - (t3 - t2) (clamped to 0)
Clock offset: offset = ((t2 - t1) + (t3 - t4)) / 2The Controller MUST run a clock sync responder on the clock port announced in its hello message — without it, Endpoints can never learn their offset and PTS scheduling (§6.4) is impossible. The round-trip delay is clamped to 0: measurement noise on a near-zero RTT can make it transiently negative. Endpoints SHOULD reject sync responses older than 1 second (stale datagrams poison the filter).
6.3 Sync Cadence
- During initial handshake: 10 rapid exchanges at 100 ms (bootstrap, alpha = 0.5).
- Steady state: adaptive on measured jitter — 5 s when jitter < 100 µs, 2 s below 1 ms, 500 ms above.
- Offset is filtered through an exponential moving average (alpha = 0.125).
- Jitter MUST be estimated with a forgetting statistic (e.g. exponentially weighted variance), not a cumulative one: slow clock drift would otherwise inflate the jitter estimate forever and pin the cadence at its fastest.
6.4 Audio Timestamps and Scheduled Start
Every audio packet carries a presentation timestamp (PTS) in the Controller's clock domain: the instant the packet's FIRST frame should hit the DAC. The Controller stamps absolute PTS values:
PTS(packet) = play_start_ns + sample_offset / sample_rate * 1e9
play_start_ns = controller_clock_ns_at_play + target_play_delay_ns
Default target play delay: 200 ms (single endpoint), 500 ms (multi-room).Scheduled start (normative): on play, the Endpoint MUST NOT start output immediately. It buffers incoming audio and starts output at the local instant corresponding to the stream's start:
head_pts = packet.pts_ns - buffered_frames_before_packet / sample_rate * 1e9
local_start = head_pts - clock_offsetThe ring-head correction matters: UDP audio can outrun the TCP play command, so the first packet observed after play is not necessarily the first packet of the stream. Anchoring on the buffer head makes all endpoints of a zone converge on the same absolute instant regardless of when each one armed. Measured on a LAN reference implementation: 38–880 µs start skew between two endpoints.
Fallbacks: if the clock is not bootstrapped or the PTS is implausible (relative timestamps from a legacy controller), the Endpoint starts immediately. If the deadline is already past (late join, slow device), the Endpoint starts immediately and realigns to the controller timeline through drift compensation (§6.6).
6.5 Buffer Management
Buffer size: target_play_delay * 2 (e.g., 1 second at 500 ms multi-room delay). Buffer states: Filling, Playing, Underrun/Overflow (with reporting).
6.6 Drift Compensation
The Endpoint MUST track its content position — frames actually consumed by the output device plus the net frames skipped or duplicated so far — and compare it against the position the clock dictates. Tracking raw consumed frames alone is insufficient: applied corrections would never show up in the measured drift and the servo would skip forever.
Correction mechanisms (in order of preference):
- Micro-adjust output clock (hardware)
- Skip/duplicate frames at inaudible rates (software; RECOMMENDED: a few frames per packet within a ±0.5 ms deadband, evaluated at ~1 Hz)
- Report drift to Controller for PTS adjustment (universal fallback)
Two special regimes are RECOMMENDED for software correction:
- Jump resync: when the deficit exceeds ~25 ms (late start), drop it in one jump as content arrives — one audible discontinuity beats seconds of audible desynchronization.
- Timeline rebase: when catch-up stalls (the content needed to catch up was lost), accept the residual latency by shifting the reference start instead of skipping arriving audio forever.
6.7 Sync Accuracy Target
| Scenario | Target | Acceptable |
|---|---|---|
| Two endpoints, wired | < 100 us | < 1 ms |
| Multi-room (3+), wired | < 500 us | < 2 ms |
| Multi-room, Wi-Fi | < 2 ms | < 5 ms |
7. Control Protocol
7.1 Message Format
JSON objects over TCP, framed with 4-byte big-endian length prefix:
[4 bytes: message length (BE u32)] [JSON payload]7.2 Handshake
// Controller -> Endpoint: HELLO
{
"type": "hello",
"protocol_version": 1,
"controller_id": "...",
"controller_name": "Tune Server",
"clock_port": 9742,
"features": ["flac_transport", "dsd_native", "multi_channel"]
}
// Endpoint -> Controller: HELLO_ACK
{
"type": "hello_ack",
"protocol_version": 1,
"endpoint_id": "...",
"endpoint_name": "Living Room DAC",
"capabilities": {
"pcm_max_rate": 768000,
"pcm_max_bits": 32,
"dsd_max_rate": 256,
"channels_max": 2,
"formats": ["PCM_S16LE", "PCM_S24LE", "PCM_S24LE4", "PCM_S32LE", "DSD_U32LE", "FLAC"],
"volume": { "type": "hw", "range": [0, 100], "step": 1 },
"gapless": true,
"seek": true
},
"audio_port": 9741,
"clock_port": 9742,
"buffer_size_ms": 1000
}7.3 Playback Commands
| Message Type | Direction | Description |
|---|---|---|
| format_propose | C -> E | Propose audio format |
| format_accept | E -> C | Accept proposed format |
| format_counter | E -> C | Counter-propose alternative |
| format_reject | E -> C | Cannot play this format |
| play | C -> E | Start/resume playback |
| pause | C -> E | Pause |
| stop | C -> E | Stop and flush buffer |
| seek | C -> E | Seek to position |
| volume_set | C -> E | Set volume (0-100 or dB) |
| volume_get | C -> E | Query volume |
| volume_report | E -> C | Report volume |
| mute | C -> E | Mute/unmute |
7.4 Metadata
{
"type": "metadata",
"track": {
"title": "Time",
"artist": "Pink Floyd",
"album": "The Dark Side of the Moon",
"duration_ms": 413000,
"artwork_url": "http://192.168.1.15:8888/api/v1/artwork/ab12cd34",
"format": "FLAC 24/96"
}
}7.5 Zone Management
| Message Type | Description |
|---|---|
| zone_assign | Assign endpoint to a zone |
| zone_update | Zone membership changed |
| zone_release | Remove endpoint from zone |
7.6 Gapless Playback
- Controller sends
next_track_preparewith next track's format. - Same format:
next_track_ready, seamless audio continuation. - Different format:
next_track_reformat, format boundary marker in stream.
8. Security
- Control channel: Optional TLS 1.3 (STARTTLS pattern). Self-signed + TOFU acceptable.
- Audio channel: NOT encrypted by default (LAN, not secret). Optional DTLS.
- Authentication: Optional PSK during handshake.
- No DRM: By design. Will not be modified to accommodate DRM.
9. Wire Format
9.1 Audio Packets (UDP)
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Ver | Flags | Format | Sequence (u16 BE) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID (u32 BE) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Presentation Timestamp (u64 BE, ns) |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Sample Offset (u64 BE) |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload Length (u16 BE) | FEC grp size |FEC index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FEC length XOR (u16 BE) | Reserved (u16) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Audio Payload ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Header: 32 bytes. Senders MUST NOT exceed 1440 payload bytes (fits a single Ethernet frame — larger payloads fragment at the IP layer and amplify loss); receivers SHOULD accept payloads up to 8192 bytes.
Format enum:
| Value | Format |
|---|---|
| 0x01 | PCM_S16LE |
| 0x02 | PCM_S24LE |
| 0x03 | PCM_S24LE4 |
| 0x04 | PCM_S32LE |
| 0x05 | PCM_F32LE |
| 0x10 | DSD_U8 |
| 0x11 | DSD_U16LE |
| 0x12 | DSD_U32LE |
| 0x20 | FLAC |
| 0x21 | OPUS |
Flags: 0x01 = first packet, 0x02 = last packet, 0x04 = FEC, 0x08 = format change boundary.
9.1.1 Forward Error Correction
FEC is XOR parity over groups of consecutive data packets. All FEC fields are zero when FEC is disabled.
- Data packets carry
fec_group_size(2–16, number of data packets per parity packet) andfec_index(this packet's position in its group,0..group_size-1). - Parity packets carry the
0x04flag and consume the sequence number following the group's last data packet. The payload is the XOR of all data payloads in the group, each zero-extended to the longest;fec_len_xoris the XOR of thepayload_lenof all data packets in the group. - Recovery: with exactly one data packet missing and the parity received, the missing payload is the XOR of the parity payload with all received payloads, truncated to the exact original length via
fec_len_xor— so no padding is injected into the stream. Two or more losses in a group are unrecoverable. - Receiver behavior: packets within a group are reordered by index and emitted in order once the group completes (or recovers). Buffering one group adds
group_size × packet_durationlatency — receivers MUST account for this within the play delay. Parity packets MUST NOT be delivered to the audio path. - Overhead:
1/group_sizebandwidth (6–50%). Intended for Wi-Fi links with occasional single-packet loss; it does not replace adequate buffering.
9.2 Clock Sync Packets (UDP)
28 bytes: Ver (4 bits) + Type (4 bits) + Sequence (u16) + T1/T2/T3 (u64 each).
9.3 Zero-Copy Design (Rust)
#[repr(C, packed)]
struct OaatAudioHeader {
ver_flags: u8,
format: u8,
sequence: u16,
stream_id: u32,
pts: u64,
sample_offset: u64,
payload_len: u16,
fec_group_size: u8,
fec_index: u8,
fec_len_xor: u16,
reserved: u16,
}10. Endpoint SDK
10.1 Minimal Implementation (~1350 LOC Rust)
| Component | LOC | Crates |
|---|---|---|
| mDNS announcement | ~100 | mdns-sd |
| TCP control (JSON) | ~300 | tokio, serde_json |
| UDP audio receiver | ~200 | tokio |
| Clock sync | ~150 | tokio |
| Packet parser | ~50 | zerocopy |
| Ring buffer | ~100 | ringbuf |
| Audio output | ~200 | cpal |
| Format negotiation | ~100 | -- |
| State machine | ~150 | -- |
10.2 Hardware Abstraction Layer
trait OaatHal {
fn configure_output(&mut self, format: AudioFormat) -> Result<()>;
fn write_frames(&mut self, data: &[u8], frames: usize) -> Result<usize>;
fn buffer_level(&self) -> usize;
fn set_volume(&mut self, level: u8) -> Result<()>;
fn actual_sample_rate(&self) -> Option<f64>;
}11. Comparison Table
| Feature | OAAT | RAAT | DLNA | AirPlay 2 | Chromecast | OpenHome |
|---|---|---|---|---|---|---|
| License | Apache 2.0 | Proprietary | UPnP Forum | Apple | BSD | |
| Cert cost | Free | Paid | Fee | MFi | Cast SDK | Free |
| Bit-perfect | Yes | Yes | Depends | No | No | Yes |
| Max PCM | 768/32 | 768/32 | Varies | 48/24 | 48/24 | Varies |
| DSD native | Yes | Yes | DoP only | No | No | DoP |
| Multi-room sync | < 1 ms | < 1 ms | None | Apple | Limited | |
| Gapless | Yes | Yes | Unreliable | Yes | Yes | Yes |
| Latency | < 200 ms | ~150 ms | 1-5 s | ~2 s | ~1 s | 1-5 s |
| DRM | None | MQA | None | FairPlay | Widevine | None |
| Endpoint LOC | ~1500 | N/A | ~5000+ | N/A | N/A | ~3000+ |
| Open source | Yes | No | Yes | Reverse-eng | No | Yes |
12. Implementation Phases
Phase 1: Foundation (MVP) (4-6 weeks)
Single Controller, single Endpoint, stereo PCM playback. oaat-types, oaat-endpoint, oaat-controller crates. Basic CLI tools.
Phase 2: Multi-Room (3-4 weeks)
Zone support, synchronized playback across 2+ endpoints. Clock sync refinement, drift detection.
Phase 3: Format Coverage (3-4 weeks)
DSD native, FLAC transport, gapless playback, all PCM formats.
Phase 4: Production Hardening (4-6 weeks)
TLS, PSK auth, reconnection logic, Wi-Fi adaptation, QoS, oaat-test conformance tool.
Phase 5: Dynamic Multi-Device ✅ (Done)
Zone Manager with event system, dynamic join/leave during playback, per-device volume (master + offset model), zone protocol messages, endpoint health monitoring, graceful degradation, C FFI bindings.
Phase 5.5: Sync & Resilience (v0.3) ✅ (Done)
Endpoint-initiated clock sync with mandatory controller responder, PTS-scheduled playback start (measured 38-880 µs start skew between two LAN endpoints), content-position drift servo (fine skip/dup, jump resync, timeline rebase), deferred FormatAccept (device readiness), FEC fully specified on the wire and implemented end-to-end (reorder + single-loss recovery with exact length restoration), bit-perfect native-format output path.
Phase 6: Ecosystem (Ongoing)
Tune integration, C FFI bindings, PyO3 bindings, example HAL implementations, outreach to Volumio/moOde/HiFiBerryOS, IETF Internet-Draft.
Phase 7: Advanced Features (Post v1.0)
Multi-channel, room correction exchange, mesh topology, WAN extension, power management.
Appendix A: Why Not Extend an Existing Protocol?
- DLNA/UPnP AV: HTTP-based, renderer-pulled. No server-push, no PTS, no sync primitive. XML/SOAP is verbose and fragile.
- OpenHome: Fixes many DLNA issues but still HTTP for audio. Songcast does multicast sync but is separate from the control plane.
- AirPlay: Apple-controlled, reverse-engineered, limited to 48 kHz.
- Chromecast: Google-controlled, lossy codecs, resampling.
- Snapcast: Good sync but compressed streams only, no format negotiation, no bit-perfect, no DSD.
Building OAAT from scratch allows clean design decisions (UDP audio, PTP sync, explicit negotiation) impossible to retrofit.
Appendix B: Bandwidth Requirements
| Format | Rate | Bitrate | Packets/s |
|---|---|---|---|
| PCM 16/44.1 stereo | 44100 | 1.41 Mbit/s | 123 |
| PCM 24/96 stereo | 96000 | 4.61 Mbit/s | 400 |
| PCM 24/192 stereo | 192000 | 9.22 Mbit/s | 800 |
| PCM 32/384 stereo | 384000 | 24.58 Mbit/s | 2134 |
| DSD64 stereo | 2.8 MHz | 5.64 Mbit/s | 490 |
| DSD128 stereo | 5.6 MHz | 11.29 Mbit/s | 980 |
| DSD256 stereo | 11.3 MHz | 22.58 Mbit/s | 1960 |
Appendix C: IANA Considerations
- Service types
_oaat._tcpand_oaat-ctrl._tcpto be registered. - Default ports 9740-9742 to be requested (currently unassigned).
Appendix D: Glossary
| Term | Definition |
|---|---|
| Controller | Server managing audio sources, decoding/DSP, streaming to Endpoints |
| Endpoint | Device/software receiving audio over OAAT, outputting to DAC |
| Zone | Logical group of Endpoints playing same stream in sync |
| PTS | Presentation Timestamp -- controller clock time for sample playback |
| HAL | Hardware Abstraction Layer -- manufacturer-implemented interface |
| TOFU | Trust On First Use -- certificate acceptance pattern |
| FEC | Forward Error Correction -- redundant data for packet loss recovery |
| EMA | Exponential Moving Average -- clock offset smoothing filter |
Ready to implement OAAT?