fix(audio): default to shared System output and resolve Auto to a concrete backend (#470)
OOTB playback froze (seekbar advancing, no audio) on hosts where the configured backend was not usable — e.g. PipeWire as the Linux default but `pactl` absent (minimal Debian/Ubuntu). "Auto" (a null backend_type) fell through to a legacy CPAL path that forced the track rate onto the shared default device, producing a suspended/silent stream and leaving a process-wide stuck audio handle that survived Reset. - Add a cross-platform "System" backend (CpalDefaultBackend now on Linux too): opens the OS default output at its negotiated rate with rodio resampling and an explicit ~100ms CPAL buffer (MixerDeviceSink has zero internal buffering, so the bare default underran and stayed suspended). Shared, no exclusivity, no `pactl` — mixes with other apps like any normal player. - Make System the OOTB default and what Reset lands on; seed it on first run. Drop the per-startup #375 NULL->PipeWire backfill migration. - Resolve a null backend_type to System in the player so the legacy CPAL path is never reached (covers legacy installs and headless callers). - "Auto" in Settings is now a resolve-and-set action: it picks the best available backend (PipeWire if available, else System), stores that concrete value and updates the dropdown + device picker, so backend_type is never null. - Explicit PipeWire (DAC passthrough) and ALSA Direct (exclusive) configs are untouched and remain bit-perfect. cc
This commit is contained in:
10 files changed
+111
-75
No files matched your search
@@ -246,7 +246,7 @@ pub fn v2_get_available_backends() -> Result<Vec<BackendInfo>, String> {
|
||||
AudioBackendType::PipeWire => "PipeWire",
|
||||
AudioBackendType::Alsa => "ALSA Direct",
|
||||
AudioBackendType::Pulse => "PulseAudio",
|
||||
AudioBackendType::SystemDefault => "System Audio",
|
||||
AudioBackendType::SystemDefault => "System",
|
||||
};
|
||||
|
||||
BackendInfo {
|
||||
|
||||
Reference in new issue
Block a user