Add audio device reinit for proper exclusive mode release
This commit is contained in:
1 parent
b6b019e659
commit
0eb0b2ec1f
4 files changed
+151
-77
No files matched your search
@@ -348,6 +348,17 @@ pub fn get_audio_output_status(
|
||||
})
|
||||
}
|
||||
|
||||
/// Reinitialize audio device (releases and re-acquires)
|
||||
/// Call this when changing audio settings like exclusive mode or output device
|
||||
#[tauri::command]
|
||||
pub fn reinit_audio_device(
|
||||
device: Option<String>,
|
||||
state: tauri::State<'_, crate::AppState>,
|
||||
) -> Result<(), String> {
|
||||
log::info!("Command: reinit_audio_device {:?}", device);
|
||||
state.player.reinit_device(device)
|
||||
}
|
||||
|
||||
/// PipeWire/PulseAudio sink information
|
||||
#[derive(serde::Serialize, Clone)]
|
||||
pub struct PipewireSink {
|
||||
|
||||
Reference in new issue
Block a user