mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-06-22 10:02:20 +00:00
Fall back after ASIO input lookup errors
This commit is contained in:
parent
3b39d32c7c
commit
5c7cfa0eaf
1 changed files with 9 additions and 2 deletions
|
|
@ -346,8 +346,15 @@ mod cpal_impl {
|
|||
fn get_device() -> ResultType<(Device, SupportedStreamConfig)> {
|
||||
let audio_input = super::get_audio_input();
|
||||
if !audio_input.is_empty() {
|
||||
if let Some(device) = get_asio_audio_input(&audio_input)? {
|
||||
return Ok(device);
|
||||
match get_asio_audio_input(&audio_input) {
|
||||
Ok(Some(device)) => return Ok(device),
|
||||
Ok(None) => {}
|
||||
Err(err) => {
|
||||
log::warn!(
|
||||
"Failed to get ASIO audio input, falling back to default audio input: {:?}",
|
||||
err
|
||||
);
|
||||
}
|
||||
}
|
||||
return get_audio_input(&audio_input);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue