qruhear

Crates.ioqruhear
lib.rsqruhear
version0.1.1
created_at2025-06-13 13:04:38.56419+00
updated_at2025-06-13 13:18:33.758793+00
descriptionA library for capturing audio from the system.
homepage
repositoryhttps://github.com/qforge-dev/qruhear
max_upload_size
id1711441
size60,753
MichaƂ Warda (michalwarda)

documentation

https://docs.rs/qruhear

README

qRUHear

Crates.io Docs.rs License

A simple crate that allows you to capture system output audio (what aRe yoU HEARing).

Dependencies

Usage

See examples folder for simple example.

use ruhear::{Ruhear, RUBuffers, RUCallback};

fn main() {
    // Create a callback that will be called every time the audio buffers are ready
    // RUBuffers is a multichannel Vec<f32>. Default sampleRate is 48000Hz on Windows and macOS and 44100Hz on Linux.
    let callback = |data: RUBuffers| {
        println!("{:?}", data);
    };

    // Create a Ruhear instance and start capturing audio, use RUCallback! macro to create a thread-safe callback
    let mut ruhear = RUCallback!(callback);

    // Start capturing audio
    ruhear.start();

    std::thread::sleep(std::time::Duration::from_secs(5));

    // Stop capturing audio
    ruhear.stop();
}

TODO

  • Error handling
  • Add support for ASIO(Windows) and JACK(Linux)
  • Add support for fine-grained control capturing audio like from a specific application/device
Commit count: 14

cargo fmt