feat(audio): release/refresh output-device button (#263)
After bit-perfect ALSA Direct grabs a DAC exclusively (hw: + D-Bus reservation), the device stays sequestered and is invisible to PipeWire, so switching back to the PipeWire backend can't see it without restarting the app. Tauri had a refresh affordance for hot-plugged DACs; this is the refresh plus an explicit release, in one button. Backend: Player::release_device() / AudioCommand::ReleaseDevice tears the stream down immediately (cancelling the deferred drop), freeing the hw: grab + its reservation, then un-suspends the parked sink and resets any forced graph clock (both self-gating). It does NOT reopen, unlike reinit_device which would re-grab the device. UI: a refresh-cw icon button beside the Output device select, propagated through the settings callback chain to handle_release_device, which releases, waits for PipeWire to reclaim, then re-enumerates so a freed or hot-plugged DAC reappears without an app restart. cc
This commit is contained in:
7 files changed
+150
-15
No files matched your search
@@ -54,6 +54,7 @@ export component AppShell inherits Rectangle {
|
||||
callback settings-select(string, int);
|
||||
callback settings-slider(string, int);
|
||||
callback settings-reset();
|
||||
callback settings-release-device();
|
||||
callback logout();
|
||||
callback close-app();
|
||||
|
||||
@@ -255,6 +256,9 @@ export component AppShell inherits Rectangle {
|
||||
settings-reset => {
|
||||
root.settings-reset();
|
||||
}
|
||||
settings-release-device => {
|
||||
root.settings-release-device();
|
||||
}
|
||||
}
|
||||
if NavState.view == ContentView.search: SearchResultsView {
|
||||
open-album(id) => {
|
||||
|
||||
Reference in new issue
Block a user