Skip to content

Replace symphonia with rockbox playback - #4

Merged
tsirysndr merged 4 commits into
mainfrom
replace-symphonia-with-rockbox-playback
Jul 13, 2026
Merged

Replace symphonia with rockbox playback#4
tsirysndr merged 4 commits into
mainfrom
replace-symphonia-with-rockbox-playback

Conversation

@tsirysndr

Copy link
Copy Markdown
Owner

No description provided.

The local audio renderer previously hand-rolled a symphonia + cpal + rb
stack (queue, shuffle/repeat, resume, ReplayGain, crossfade, EQ/tone DSP,
HTTP streaming) in a 2215-line SymphoniaPlayer. rockbox-playback 0.4 now
provides all of that natively, so swap the implementation for a thin
adapter over its Player.

- Add rockbox-playback = "0.4"; drop symphonia, cpal, rb and the direct
  rockbox-dsp dep (all now transitive).
- New rockbox_player.rs (RockboxPlayer) implements Renderer by delegating
  to rockbox_playback::Player. Player owns a cpal stream and is !Send +
  !Sync, so it lives on a dedicated worker thread driven by FnOnce(&Player)
  command closures; the struct holds only the Sender + a Send+Sync metadata
  mirror. Delete symphonia_player.rs and voice_dsp.rs.
- Persistence: the engine owns queue order + exact playhead via its own
  resume_file; fin's queue.json stays a metadata sidecar so the TUI keeps
  server-provided titles/artwork. restore() calls Player::resume() with a
  seed-from-sidecar fallback for first-run migration.
- Slim replaygain.rs / crossfade.rs to re-exports of the fin-config types
  (tag extraction + fade curves now live in the engine).
- Rewire lib.rs / local.rs and refresh docs; sweep stale "symphonia"
  mentions across fin, fin-tui and fin-mediarenderer.
- flake.nix: add stdenv.cc to the package and dev shell — rockbox-codecs /
  rockbox-dsp compile Rockbox's C sources via the cc crate.

Note: rockbox-playback is GPL-2.0-or-later, so linking it makes the fin
binary GPL (already true via rockbox-dsp).
Update the workspace version, flake build version, README install URLs
and the Debian/RPM packaging manifests from 0.5.0 to 0.6.0.
Document the symphonia → rockbox-playback audio backend swap and the
GPL/stdenv.cc build note under a new 0.6.0 release section.
Add a "Supported audio formats" table (grouped lossless / lossy / PCM /
game audio) covering the full rockbox-playback codec set, wire it into the
table of contents, and refresh the remaining stale "symphonia" references
throughout the README to point at rockbox-playback.
@tsirysndr tsirysndr self-assigned this Jul 13, 2026
@tsirysndr tsirysndr added the enhancement New feature or request label Jul 13, 2026
@tsirysndr
tsirysndr merged commit 581ac73 into main Jul 13, 2026
2 checks passed
@tsirysndr
tsirysndr deleted the replace-symphonia-with-rockbox-playback branch July 13, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant