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

fix: some virtual devices not showing up on macos

Louis Beaumont0d9713288319
diff --git a/Cargo.toml b/Cargo.toml
index 63e68ccf6..69fcb1ceb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@ resolver = "2"
[workspace.package]
-version = "0.1.87"
+version = "0.1.88"
authors = ["louis030195 <[email protected]>"]
description = ""
repository = "https://github.com/mediar-ai/screenpipe"
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index e55826102..b3aff618e 100644
--- a/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "0.2.59"
+version = "0.2.60"
description = ""
authors = ["you"]
license = ""
diff --git a/screenpipe-audio/src/core.rs b/screenpipe-audio/src/core.rs
index 23ba31bfc..18470c67d 100644
--- a/screenpipe-audio/src/core.rs
+++ b/screenpipe-audio/src/core.rs
@@ -321,7 +321,14 @@ pub async fn list_audio_devices() -> Result<Vec<AudioDevice>> {
// Filter function to exclude macOS speakers and AirPods for output devices
fn should_include_output_device(name: &str) -> bool {
- !name.to_lowercase().contains("speakers") && !name.to_lowercase().contains("airpods")
+ #[cfg(target_os = "macos")]
+ {
+ !name.to_lowercase().contains("speakers") && !name.to_lowercase().contains("airpods")
+ }
+ #[cfg(not(target_os = "macos"))]
+ {
+ true
+ }
}
// macos hack using screen capture kit for output devices - does not work well
@@ -349,6 +356,15 @@ 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()) {
+ // TODO: not sure if it can be input, usually aggregate or multi output
+ devices.push(AudioDevice::new(device.name().unwrap(), DeviceType::Output));
+ }
+ }
+
Ok(devices)
}