fix(audio): validate saved device exists in current enumeration
- Clear stale device IDs from DB when they don't exist in enumeration - Add warning when device lookup fails in handleBackendDeviceChange - Add logging to set_audio_output_device command for debugging ALSA card numbers (hw:X,0) can change between boots when USB devices are connected/disconnected. This fix prevents using invalid device IDs that cause playback failures. cc
This commit is contained in:
1 parent
1e3aa7b0df
commit
67895aaa9b
2 files changed
+16
No files matched your search
@@ -292,6 +292,7 @@ pub fn set_audio_output_device(
|
||||
state: tauri::State<'_, AudioSettingsState>,
|
||||
device: Option<String>,
|
||||
) -> Result<(), String> {
|
||||
log::info!("Command: set_audio_output_device {:?}", device);
|
||||
let store = state.store.lock().map_err(|e| format!("Lock error: {}", e))?;
|
||||
store.set_output_device(device.as_deref())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user