mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-15 21:11:27 +03:00
fix: poison error on setting sound input
This commit is contained in:
@@ -112,7 +112,9 @@ pub fn set_sound_input(device: String) {
|
|||||||
let prior_device = get_option("audio-input".to_owned());
|
let prior_device = get_option("audio-input".to_owned());
|
||||||
if prior_device != device {
|
if prior_device != device {
|
||||||
log::info!("switch to audio input device {}", device);
|
log::info!("switch to audio input device {}", device);
|
||||||
set_option("audio-input".to_owned(), device);
|
std::thread::spawn(move || {
|
||||||
|
set_option("audio-input".to_owned(), device);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
log::info!("audio input is already set to {}", device);
|
log::info!("audio input is already set to {}", device);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user