voice_bird_cli/audio/loopback/
mod.rs1#[cfg(not(target_os = "macos"))]
11use anyhow::anyhow;
12use anyhow::Result;
13
14use crate::audio::capture::CaptureHandle;
15
16#[cfg(target_os = "macos")]
17pub mod loopback_macos;
18
19#[cfg(target_os = "windows")]
20pub mod loopback_windows;
21
22pub fn capture_loopback(name: Option<&str>) -> Result<CaptureHandle> {
25 #[cfg(target_os = "macos")]
26 {
27 loopback_macos::capture(name)
28 }
29 #[cfg(not(target_os = "macos"))]
30 {
31 let _ = name;
32 Err(anyhow!("loopback capture not yet wired on this platform"))
33 }
34}
35
36pub fn capture_app(identifier: &str) -> Result<CaptureHandle> {
41 #[cfg(target_os = "macos")]
42 {
43 loopback_macos::capture_app(identifier)
44 }
45 #[cfg(target_os = "windows")]
46 {
47 loopback_windows::capture_app(identifier)
48 }
49 #[cfg(not(any(target_os = "macos", target_os = "windows")))]
50 {
51 let _ = identifier;
52 Err(anyhow!("per-app capture not yet wired on this platform"))
53 }
54}