MCPcopy Create free account
hub / github.com/Recordscript/recordscript / select_speaker

Function select_speaker

src-tauri/src/main.rs:91–98  ·  view source on GitHub ↗
(selected_device: State<'_, SelectedDevice>, device_name: String)

Source from the content-addressed store, hash-verified

89
90#[tauri::command]
91fn 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]
101fn select_screen(selected_device: State<'_, SelectedDevice>, device_name: String) {

Callers

nothing calls this directly

Calls 2

list_speakerFunction · 0.70
nameMethod · 0.45

Tested by

no test coverage detected