mirror of
https://github.com/csd4ni3l/soundboard.git
synced 2026-03-10 17:19:24 +01:00
Fix Windows build crashing because virtual_mic is Option Device not just Device (not inside let Some)
This commit is contained in:
@@ -60,18 +60,6 @@ pub fn create_virtual_mic_windows() -> (OutputStream, OutputStream) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if let Some(virtual_mic) = virtual_mic {
|
if let Some(virtual_mic) = virtual_mic {
|
||||||
// nothing, let Some doesnt support !
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
MessageDialog::new()
|
|
||||||
.set_title("VB Cable Driver not installed.")
|
|
||||||
.set_description("Could not access VB Cable output device. Is VB Cable Driver installed?")
|
|
||||||
.set_buttons(MessageButtons::Ok)
|
|
||||||
.show();
|
|
||||||
|
|
||||||
std::process::exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
route_standard_to_virtual(&host, &virtual_mic);
|
route_standard_to_virtual(&host, &virtual_mic);
|
||||||
|
|
||||||
let normal_output = host
|
let normal_output = host
|
||||||
@@ -88,4 +76,14 @@ pub fn create_virtual_mic_windows() -> (OutputStream, OutputStream) {
|
|||||||
.open_stream()
|
.open_stream()
|
||||||
.expect("Failed to open stream"),
|
.expect("Failed to open stream"),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MessageDialog::new()
|
||||||
|
.set_title("VB Cable Driver not installed.")
|
||||||
|
.set_description("Could not access VB Cable output device. Is VB Cable Driver installed?")
|
||||||
|
.set_buttons(MessageButtons::Ok)
|
||||||
|
.show();
|
||||||
|
|
||||||
|
std::process::exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user