feat(audio): notify user when selected output device goes missing (issue #307)
Level A of issue #307. When the configured output device has disappeared from the host device list at the time of play/resume (KVM switched away, USB sink unplugged, PipeWire sink removed…) the backend emits an 'audio:device-missing' event and the frontend shows a warning toast: 'Output device "XYZ" is no longer available. Using system default.' The existing init_device fallback already routes audio to the system default, so this is purely informational — the user now understands why audio came out of a different sink instead of staring at a silent progress bar. Does NOT touch the sacred audio init path (pipewire_backend.rs, init_device, audio_settings.rs). New module audio_device_watch.rs adds a pure presence check, a new-state throttle so we don't emit on every resume once the user's been notified, and a v2 command v2_check_audio_device_presence so the frontend can poll on demand. Ready for Level B (background watchdog) — the same helpers plug into a timer without further refactor; Level B only needs to add a tokio task that calls emit_missing_if_needed() every N seconds while playback is active. cc
This commit is contained in:
10 files changed
+243
-5
No files matched your search
@@ -1687,7 +1687,8 @@
|
||||
},
|
||||
"laodingDevices": "Geräte werden geladen...",
|
||||
"findingSimilarArtists": "Suche nach ähnlichen Künstlern...",
|
||||
"awardUnavailable": "Detailansicht für diese Auszeichnung nicht verfügbar."
|
||||
"awardUnavailable": "Detailansicht für diese Auszeichnung nicht verfügbar.",
|
||||
"audioDeviceMissing": "Ausgabegerät '{device}' ist nicht mehr verfügbar. Standardgerät wird verwendet."
|
||||
},
|
||||
"offline": {
|
||||
"title": "Offline-Modus",
|
||||
|
||||
Reference in new issue
Block a user