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

try fix windows output device

Louis Beaumont4253510e7cbf
diff --git a/screenpipe-audio/src/core.rs b/screenpipe-audio/src/core.rs
index b78b054e6..fc1693781 100644
--- a/screenpipe-audio/src/core.rs
+++ b/screenpipe-audio/src/core.rs
@@ -126,6 +126,8 @@ async fn get_device_and_config(
info!("device: {:?}", audio_device.to_string());
+ let is_output_device = audio_device.device_type == DeviceType::Output;
+
let audio_device = if audio_device.to_string() == "default" {
match audio_device.device_type {
DeviceType::Input => host.default_input_device(),
@@ -170,7 +172,11 @@ async fn get_device_and_config(
}
.ok_or_else(|| anyhow!("Audio device not found"))?;
- let config = audio_device.default_input_config()?;
+ let mut config = audio_device.default_input_config()?;
+ // if output device and windows, using output config
+ if cfg!(target_os = "windows") && is_output_device {
+ config = audio_device.default_output_config()?;
+ }
Ok((audio_device, config))
}