(selected_device: State<'_, SelectedDevice>, device_name: String)
| 89 | |
| 90 | #[tauri::command] |
| 91 | fn select_speaker(selected_device: State<'_, SelectedDevice>, device_name: String) { |
| 92 | let device = recorder::list_speaker().into_iter() |
| 93 | .find(|device| device.name().unwrap_or_default() == device_name).unwrap(); |
| 94 | |
| 95 | selected_device.lock().unwrap().speaker = Some(device); |
| 96 | |
| 97 | println!("Switching speaker to {device_name:?}"); |
| 98 | } |
| 99 | |
| 100 | #[tauri::command] |
| 101 | fn select_screen(selected_device: State<'_, SelectedDevice>, device_name: String) { |
nothing calls this directly
no test coverage detected