Klingt
A lock-free audio graph library with message-passing parameter control.
Features
- Lock-free audio thread – No allocations, no
Arc/Mutexon the hot path - Automatic resampling – Nodes at different sample rates just work
- Simple API – Add nodes, connect them, call
process()
Quick Start
use ;
Runtime Parameter Control
Send messages to nodes without locks:
use ;
let mut klingt = default_output.unwrap;
let mut sine = klingt.add;
let gain = klingt.add;
klingt.connect;
klingt.output;
// Change frequency at runtime (lock-free!)
sine.send.ok;
Automatic Sample Rate Conversion
Add nodes at their native sample rate – Klingt handles the rest:
// Audio file at 48kHz + device at 44.1kHz = automatic resampling
let player = new;
let handle = klingt.add; // Sub-graph created automatically
klingt.output; // Routed through resampler
Built-in Nodes
- Sources:
Sine,SamplePlayer - Effects:
Gain,Mixer,SlewLimiter - Sinks:
CpalSink(withcpal_sinkfeature)
Custom Nodes
Implement the AudioNode trait to create your own:
use ;
use ;
Feature Flags
cpal_sink– Enable CPAL audio outputstd– Enable standard library (enabled by default)
License
MIT