(selected_device: State<'_, SelectedDevice>, device_name: String)
| 79 | |
| 80 | #[tauri::command] |
| 81 | fn select_microphone(selected_device: State<'_, SelectedDevice>, device_name: String) { |
| 82 | let device = recorder::list_microphone().into_iter() |
| 83 | .find(|device| device.name().unwrap_or_default() == device_name).unwrap(); |
| 84 | |
| 85 | selected_device.lock().unwrap().microphone = Some(device); |
| 86 | |
| 87 | println!("Switching microphone to {device_name:?}"); |
| 88 | } |
| 89 | |
| 90 | #[tauri::command] |
| 91 | fn select_speaker(selected_device: State<'_, SelectedDevice>, device_name: String) { |
nothing calls this directly
no test coverage detected