Bit-perfect output for lossless sources

Aperta
#783 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start by reading src/infra/audio/player.rs and investigating cpal/rodio output capabilities for WASAPI exclusive mode, ALSA direct devices, and macOS device switching. Then assess how lossless sources expose sample rate and bit depth and how the playbar reports playback status. Done means an opt-in path supports the requested platform behaviors and reports when output is not bit-perfect; this issue leaves the design open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Is your feature request related to a problem? Please describe.

On Reddit, someone asked for bit-perfect output. Qobuz, local FLAC files and Subsonic (when the server sends FLAC) are lossless at the source, but the output is not bit-perfect today:

  • Every decoded source plays through one rodio sink (LocalPlayer in src/infra/audio/player.rs), and the volume is applied in software.
  • In the OS shared mixer, the audio can be resampled to the device's rate (Windows shared mode does this) and mixed with other apps.

Describe the solution you'd like

An opt-in bit-perfect mode for the lossless sources:

  • Open the output at the track's own sample rate and bit depth, with no resampling.
  • No software volume (fixed at 100%), and the EQ from #782 off.
  • Exclusive access where the platform has it: WASAPI exclusive mode on Windows, a direct hw: device on ALSA, and the device sample rate switch (or hog mode) on macOS.
  • A small indicator in the playbar when the path is really bit-perfect, and the reason when it is not (for example: the device does not support 24-bit / 192 kHz).

Scope: the decoded lossless sources only. Spotify through librespot is lossy (Ogg Vorbis up to 320 kbit/s), so bit-perfect does not apply there.

Describe alternatives you've considered

Setting the OS output to the track's sample rate by hand gets close on some systems, but it is easy to get wrong and changes with every track.

Additional context

As far as I know, cpal (under rodio) has no WASAPI exclusive mode, so this probably needs its own output path next to the rodio sink. That needs a look before any design.

Lingua principale
Rust
Stelle
1.4k
Fork
238
Merge medio
9h 52m
PR unite (30g)
177

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LargeModGames/spotatui

Tutte le issue di LargeModGames/spotatui

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.