1 unstable release
new 0.1.0 | Jan 26, 2025 |
---|
#258 in Audio
90 downloads per month
390KB
9K
SLoC
Contains (JAR file, 60KB) gradle-wrapper.jar, (obscure autoconf code, 13KB) cava/configure.ac
Cava-rs
A rust wrapper for cavacore.
Required dependencies
Example
use cavacore::{Builder, Cavacore, Channel};
// Configure cava with the builder first...
let builder = Builder {
// we will only listen to one channel
channel: Channel::Mono,
.. Builder::default()
};
let mut cava = builder.build().expect("Build cava");
// feed cava with some samples
let mut new_samples: [f64; 3] = [1., 2., 3.];
// and let it give you the bars back
let bars = cava.execute(&mut new_samples);
lib.rs
:
A safe rust wrapper of the cavacore engine.
Example
use cavacore::{Builder, Cavacore, Channel};
// Configure cava with the builder first...
let builder = Builder {
// we will only listen to one channel
channel: Channel::Mono,
.. Builder::default()
};
let mut cava = builder.build().expect("Build cava");
// feed cava with some samples
let mut new_samples: [f64; 3] = [1., 2., 3.];
// and let it give you the bars back
let bars = cava.execute(&mut new_samples);
No runtime deps
~0–2.2MB
~45K SLoC