Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

filter incompatible devices from list_audio_devices

Ezra Ellette50de1fea2376
diff --git a/screenpipe-audio/src/core.rs b/screenpipe-audio/src/core.rs
index 6271a67a2..5a96f1a5b 100644
--- a/screenpipe-audio/src/core.rs
+++ b/screenpipe-audio/src/core.rs
@@ -384,7 +384,9 @@ pub async fn list_audio_devices() -> Result<Vec<AudioDevice>> {
// last, add devices that are listed in .devices() which are not already in the devices vector
let other_devices = host.devices().unwrap();
for device in other_devices {
- if !devices.iter().any(|d| d.name == device.name().unwrap()) {
+ if !devices.iter().any(|d| d.name == device.name().unwrap())
+ && should_include_output_device(&device.name().unwrap())
+ {
// TODO: not sure if it can be input, usually aggregate or multi output
devices.push(AudioDevice::new(device.name().unwrap(), DeviceType::Output));
}