qruhear/
lib.rs

1//! Capture audio from the system and send it to a callback function.
2//!
3//! See [examples](https://github.com/aizcutei/ruhear/tree/main/examples) for usage.
4
5#[cfg(not(target_os = "macos"))]
6mod cpal;
7#[cfg(not(target_os = "macos"))]
8pub use cpal::RUHear;
9
10#[cfg(target_os = "macos")]
11mod screencapturekit;
12#[cfg(target_os = "macos")]
13pub use screencapturekit::RUHear;
14
15pub type RUBuffers = Vec<Vec<f32>>;
16
17#[macro_export]
18macro_rules! rucallback {
19    ($callback:expr) => {
20        Arc::new(Mutex::new($callback))
21    };
22}