Skip to main content

Documentation Index

Fetch the complete documentation index at: https://rockboxzig.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Rockbox writes decoded PCM into a single active sink at a time. The sink is selected by the audio_output key in settings.toml, but it can also be changed at runtime — e.g. by clicking a discovered Chromecast in the device picker.
Sinkaudio_outputUse it for
Built-in SDLbuiltinLocal speakers / headphones
FIFO / pipefifoSnapcast (pipe://), ffplay, any pipe consumer
Snapcast TCPsnapcast_tcpSnapserver tcp:// source with auto-discovery
AirPlay (RAOP)airplayApple TV, HomePod, Airport Express, shairport-sync
SqueezelitesqueezeliteLogitech-style multi-room with squeezelite clients
ChromecastchromecastGoogle Home, Chromecast Audio, Nest Hub
UPnP / DLNAupnpKodi, VLC, BubbleUPnP, any UPnP MediaRenderer

Stream format

Every sink receives the same byte stream: S16LE stereo PCM at 44 100 Hz. The Rockbox DSP pipeline dithers and downmixes higher-bit-depth decoder output before it reaches the sink.

Fan-out

A few sinks support sending the same stream to multiple receivers simultaneously:
  • AirPlay — list multiple [[airplay_receivers]] and they all share the same initial_rtptime, keeping playback within ~8 ms across the LAN.
  • Squeezelite — any number of squeezelite clients can attach to one rockboxd; a sync packet aligns their clocks once per second.
  • Snapcast — fan-out is handled by snapserver, not Rockbox.
For Chromecast, AirPlay and UPnP the LAN is also scanned with mDNS / SSDP at startup; discovered devices show up in the web UI and desktop picker without any config-file edits.

Switching sinks at runtime

Through the GraphQL API:
mutation Connect {
  connectDevice(id: "chromecast-living-room")
}
…or through the desktop / web device picker. The active sink is stopped, the new sink’s init and start hooks run, and audio resumes within a frame.

Architecture

Each sink implements the pcm_sink_ops vtable in firmware/export/pcm_sink.h. The full list of sinks with file paths and implementation notes lives in Architecture › PCM sinks.