Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.

Commit b241117

Browse files
committed
Add messagedialog when VB Cable is not installed.
1 parent dcf121c commit b241117

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/windows_lib.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use rodio::{
22
OutputStream, OutputStreamBuilder,
33
cpal::{self, traits::{DeviceTrait, StreamTrait, HostTrait}, StreamConfig, SampleRate},
44
};
5-
5+
use rfd::{MessageButtons, MessageDialog, MessageDialogResult};
66
use ringbuf::{traits::*, HeapRb};
77

88
fn route_standard_to_virtual(host: &cpal::Host, virtual_mic: &cpal::Device) {
@@ -57,7 +57,15 @@ pub fn create_virtual_mic_windows() -> (OutputStream, OutputStream) {
5757
.map(|name| name.contains("CABLE Input") || name.contains("VB-Audio"))
5858
.unwrap_or(false)
5959
})
60-
.expect("Could not get VB Cable output device. Is VB Cable Driver installed?");
60+
.unwrap_or("Not installed");
61+
62+
if virtual_mic == "Not installed" {
63+
MessageDialog::new()
64+
.set_title("VB Cable Driver not installed.")
65+
.set_description("Could not access VB Cable output device. Is VB Cable Driver installed?")
66+
.set_buttons(MessageButtons::Ok)
67+
.show();
68+
}
6169

6270
route_standard_to_virtual(&host, &virtual_mic);
6371

0 commit comments

Comments
 (0)