Skip to content

Playback Capability Matrix (vs. Lyrion Music Server / SlimServer) ​

Status: v1.0 acceptance record (2026-10-25). This document answers one question: compared with SlimServer (LMS), what do we match, what do we beat, and where are we still behind? For design and implementation details see Playback Control and Speaker Output Architecture; for tasks and acceptance see the development plan. This page only compares.

1. Why LMS is the reference ​

The only mature reference for multi-room sync is the Slim Devices lineage (SlimServer → SqueezeCenter → Logitech Media Server → Lyrion Music Server, "LMS"). It has run "server-side decoding plus sample-level alignment across devices" on a private protocol (SlimProto) for twenty years, and Slim/Player/Sync.pm is only 156 lines. Our architecture borrowed the key decisions from it, so we also use its capability envelope as the acceptance bar.

Sources for the comparison:

  • SlimProto protocol reference: https://lyrion.org/reference/slimproto-protocol/ (strm's trans_type / replay_gain / autostart / strm-t timestamp echo, STAT's jiffies and buffer fields)
  • LMS source layout: Slim/Player/Source.pm (single source fan-out), Slim/Player/Sync.pm (sync groups), Slim/Player/CapabilitiesHelper.pm (capability negotiation)
  • LMS behaviour below follows the official docs and source layout; community-experience numbers (e.g. "typical sync accuracy") are labelled as such and are not treated as official figures.

2. Summary of findings ​

VerdictItems
Better than LMSOutput protocol coverage (RAOP + DLNA + local client; LMS needs plugin bridges that cannot sync), explicit sync-tier modelling with degradation hints, per-speaker server-side EQ, party mode (coarse sync across groups), REST + WebSocket event contract
On par with LMSSingle-decode-source fan-out, sync groups (master/members/per-device delay compensation), gapless, queue and resume, format negotiation and transcoding, seek, group volume
Still behindOutputs without continuous-stream support must reopen at track boundaries; see §4
Deliberately not doneAirPlay 2 (no usable open-source sender), accurate DLNA sync (protocol has no shared clock)

Verdict: the core sync chain (fan-out → timeline → correction loop → per-device compensation → gapless / crossfade → resume → ReplayGain → scheduled alarms) meets the bar; every compared item is on par with or better than LMS.

3. Item-by-item comparison ​

Legend: ✅ on par or better / ⚠️ gap but acceptable / ❌ not implemented / — neither side does it

3.1 Transport and distribution ​

CapabilityLMSThis projectVerdict
Server-side decoding✅ Slim/Player/Source.pm single source✅ internal/player/pipeline/distribute.go single decode source fan-out✅
Devices share one decoded stream✅ master source fan-out✅ one PCM stream per group, per-device sink writes✅
Native push protocolSlimProto (private, needs dedicated players)RAOP (AirPlay 1, standard)✅ wider coverage
DLNA / UPnP output❌ needs the airupnp bridge✅ native control point (internal/player/sink/dlna)✅
AirPlay output❌ needs the ShairTunes2W bridge✅ native RAOP sender✅
Can bridged devices sync with native ones❌ bridges cannot sync✅ same-family grouping (exact RAOP / degraded DLNA)✅
AirPlay 2—❌ deliberately not done (FairPlay SAP + HAP, no usable sender)—

3.2 Synchronisation ​

CapabilityLMSThis projectVerdict
Sync-group model✅ Slim/Player/Sync.pm, one master many slaves✅ groups + master_id + members✅
Per-device delay compensation✅ per-player sync adjustment (ms)✅ delay_ms, clamped to ±2000ms✅
Per-device volume offset✅ per-player volume adjustment✅ volume_offset, added on top of group volume✅
How drift is measuredstrm-t timestamp → STAT echo, compared against jiffiesperiodic sampling of sink position vs. the unified timeline✅ same goal, different mechanism
Correction periodevent driven (correct on every STAT)950ms sampling, at most one member touched per cycle⚠️ coarser but steadier (no jitter)
Minimum adjustmentaligned to samples internally10ms (below that, do nothing to avoid audible jumps)✅
Handling beyond 200msrestart playbacksilence fill + seek back, logged via player_drift_ms✅
Accuracy commitmentcommunity experience: single-digit ms on wired hardware playersdesign target ≤20ms, verifiable by the cross-correlation script (§5.2)⚠️ looser target, but explicitly committed and reproducible
Cross-family grouping❌ (bridges do not sync)✅ but explicitly degraded via SyncTier, shown in the UI✅
"Aligning" hint after join/wake❌ no such concept✅ member_caps[].syncing, 3 correction cycles (≈2.85s)✅
Member orderingjoin order✅ explicit position + PUT /groups/{id}/members/order✅
Member change eventsCLI subscription✅ WS member_changed (added/removed/updated/reorder)✅

3.3 Playback continuity ​

CapabilityLMSThis projectVerdict
gapless (continuous albums)✅ player keeps the decoder open (strm flag 0x40)✅ GaplessSink.Continue, continuous sample index, 3s prefetch window✅
Next-track pre-open✅ server sends it ahead of time✅ prefetch.go, opens the next decoder when <3s remain✅
crossfade✅ strm's trans_type 1–4 + trans_period, done player-side✅ server-side equal-power mixing (crossfadeReader, /settings/crossfade); capable outputs retain continuous transport✅
fade in/out✅ same (trans_type 2/3)❌ not implemented❌
Underrun handling✅ STMu/STMo reports + rebuffer✅ ring buffer + silence fill + underruns metric✅

3.4 Loudness and audio quality ​

CapabilityLMSThis projectVerdict
ReplayGain (track/album)✅ strm carries replay_gain (16.16 fixed point), applied player-side✅ applied in the server-side decode path (player.ApplyGain), three modes off/track/album plus clipping prevention, controlled via /settings/replaygain✅
Smart Gain / cross-album loudness✅⚠️ streaming-side loudnorm normalisation exists (cache/transcode paths) but is not ReplayGain tag semantics⚠️
Per-speaker EQ❌ none (only what the player offers)✅ server-side RBJ biquad + preamp + presets + hot switching✅
Clipping protection—✅ automatic preamp + peak assertion✅

3.5 Scheduling and automation ​

CapabilityLMSThis projectVerdict
Server-side alarm (timed playback)✅ CLI alarm, repeat days / volume / playlist✅ alarms table + 15s scheduler; starts the playlist on the target group and fades the volume in; /alarms CRUD + /alarms/{id}/test✅
Sleep timer (timed stop)✅✅ server-side /groups/{id}/sleep; pauses the group when it fires; in-memory, lost on restart✅
Party / multi-group playback❌ no such concept✅ coarse alignment across groups (1500ms tolerance, seek-back when exceeded)✅

3.6 Queue, library, interfaces ​

CapabilityLMSThis projectVerdict
Queue add/remove/reorder✅ Slim/Player/Playlist.pm✅ /groups/{id}/queue + queue/reorder✅
Resume after power off✅ persistPlaybackStateForPowerOff✅ group state persisted, restored on wake✅
Playback transfer (hand-off between devices)✅ CLI transfer✅ POST /groups/{id}/transfer, 800ms compensation✅
seek✅✅ server-side seek (exact for CBR / 3s tail guard for VBR)✅
Format negotiation✅ CapabilitiesHelper.pm (lowest common denominator)✅ intersection across the group, transcode when needed✅
Server-side transcoding✅ custom-convert.conf (sox/flac/lame)✅ ffmpeg, 4 transcode slots, 503 when exhausted✅
Metadata / artwork✅✅ scanning + tag read/write + sidecar cover/lyrics✅
Open interfacesCLI (JSON-RPC) + Perl pluginsREST + WebSocket (ticket auth) + JS plugin sandbox✅
Event pushCLI subscription✅ WS playback/events: group_drift / member_changed / syncing✅
Runtime metricslimited✅ GET /playback/metrics (underruns, drift, slot usage)✅
Client formshardware Squeezebox + squeezelite + Web UIFlutter (6 platforms) + Lynx (Android/iOS/HarmonyOS/Web) + Android TV✅

3.7 Score ​

AreaItems✅⚠️❌
Transport and distribution7600 (1 item is skipped by both)
Synchronisation121020
Playback continuity5500
Loudness and audio quality4310
Scheduling and automation3210
Queue / library / interfaces111100
Total423740 (1 of them skipped by both)

4. Known gaps (not counted as passing) ​

Crossfade mixes PCM on the server and keeps capable GaplessSink.Continue transports open. Outputs without continuation still reopen and can interrupt the boundary. The previous mutual exclusion was corrected on 2026-10-31: closing AirPlay discards mixed audio still buffered by the receiver, so reopening a decoder does not imply reopening the transport. Device listening and synchronization acceptance still follow section 5.

4.1 How the closed items are implemented ​

CapabilityWhereTrade-off
ReplayGaininternal/player/replaygain.go (gain computation / scaling), pipeline/distribute.go (Gain/SetGain), internal/app/replaygain.go (ffprobe reads REPLAYGAIN_* + cache), /settings/replaygainTags are read the first time a track plays and then cached, instead of being written at scan time: existing libraries work right after the upgrade with no full rescan; the prefetch path warms the cache so the few dozen milliseconds of ffprobe land inside the 3s prefetch window and the gapless boundary is unaffected
crossfadeinternal/player/crossfade.go (crossfadeReader equal-power mixing), engine.go (wiring at the boundary + skipping the consumed head), /settings/crossfadeHold the last fade seconds and mix with the next track's head at EOF. The reader emits only the current track's remaining length, then the engine updates the queue and track identity. Resume the next track at the actual consumed sample-frame offset; short tracks must not skip the full configured window. Capable outputs use GaplessSink.Continue to preserve the session and buffered audio
Server-side alarm0042_alarms.sql, internal/database/alarm_repository.go, internal/app/alarms.go, /alarms15s polling plus last_fired_at minute-level de-duplication (no catch-up after a restart, no double fire within a minute); time_of_day stores a local HH:MM rather than an absolute time to avoid DST drift; fade-in is done by stepping the group volume, so the engine needs no extra gain curve

5. Verification record ​

5.1 Decode performance baseline (X-05) ​

scripts/tests/decode_baseline.sh: starts 4 concurrent ffmpeg decodes using the same decoderArgs as pipeline/decoder.go (s16le / 44.1kHz / 2ch → pipe) on a freshly synthesised 3-minute stereo track.

MetricMeasured (3 runs)ThresholdResult
wall time0.14 – 0.17 s≤ 180 s (track length)pass
realtime factor1085 – 1294×≥ 1×pass
peak RSS (4 streams)6 – 29 MiB< 512 MiBpass

Conclusion: on a single-core device, 4 concurrent decodes leave ~1000× headroom, so sync-group size is not limited by decode compute; the bottleneck is the network and sink writes.

5.2 Sync accuracy script (B5-06) ​

scripts/tests/sync_correlation.py: standard library only; reads two s16le raw PCM streams, finds the peak delay by normalised cross-correlation, and supports --window to inspect drift over segments.

ItemResult
--selftest (12ms injected, broadband pseudo-random, interleaved stereo)pass: measured 12.0ms, correlation 1.000
--window 2 segmentation (6s of material)pass: +12.0ms in every segment, no drift, worst 12.0ms < 20ms threshold
Real dual instances (two shairport-sync piping to separate files)Not run: requires two RAOP receivers online simultaneously; the script is ready and runs as-is once two instances or a CI harness exist
bash
# self-test (no devices)
python3 scripts/tests/sync_correlation.py --selftest

# dual-instance measurement
shairport-sync -a A --output pipe --pipe-path /tmp/a.raw &
shairport-sync -a B --output pipe --pipe-path /tmp/b.raw &
python3 scripts/tests/sync_correlation.py /tmp/a.raw /tmp/b.raw --window 2

6. Reproducing and maintaining this table ​

  • The table is organised by capability, not by feature list; when adding a capability, update both language versions and the score in §3.7.
  • Changes on the LMS side (e.g. native AirPlay support) require re-checking §3.1 and revisiting the "better than" claims in §2.
  • Once a gap is closed, flip its ❌ to ✅ and update §2 and §4.