17 unstable releases (3 breaking)
| 0.6.3 | Feb 25, 2026 |
|---|---|
| 0.6.2 | Feb 25, 2026 |
| 0.5.12 | Feb 18, 2026 |
| 0.4.1 | Feb 7, 2026 |
| 0.3.1 | Feb 3, 2026 |
#745 in Audio
119 downloads per month
Used in proteus-cli
585KB
14K
SLoC
Proteus Library
proteus-lib is the core Rust library behind the Proteus audio tools. It provides:
- Container parsing for
.prot/.mkafiles. - A real-time playback engine and high-level
PlayerAPI. - DSP utilities (convolution reverb and impulse response loading).
- Diagnostics and benchmark helpers (optional feature flags).
Quick Start
use proteus_lib::playback::player::Player;
fn main() {
let file_path = "/path/to/file.prot".to_string();
let mut player = Player::new(&file_path);
player.play();
player.sleep_until_end();
}
Structure
container/
- Parses
.prot/.mkacontainers, readsplay_settings.json, and exposes track selections. info.rshandles probe metadata, duration lookup, and full packet scanning.play_settings/models multiple schema versions via serde.
playback/
player.rsis the main public API (Player) that manages state and threads.engine/contains the lower-level mixing engine, buffer management, and reverb worker.
dsp/
convolution.rsprovides FFT-based convolution (complex or real FFT).reverb.rswraps convolution into a reusable per-channel reverb.impulse_response.rsloads and normalizes impulse responses from files or container attachments.
audio/
- Shared ring buffers and sample helpers used by the engine.
diagnostics/
- Optional benchmark utilities and a
Reporterto emit playback status snapshots.
Playback Model (High Level)
- A
Protcontainer resolves track selections and metadata. - Track decoder threads feed per-track ring buffers.
- A mixing thread combines buffers into interleaved audio.
- Optional convolution reverb is applied (if enabled).
- The
Playersends mixed audio to the output sink.
Impulse Responses
Impulse responses can be loaded from:
- a file path (
file:ir.wavor plain path) - a
.prot/.mkaattachment (attachment:ir.wav)
Tail trimming defaults to -60 dB and can be overridden via settings or at runtime.
Feature Flags
bench: enables synthetic DSP benchmarks.real-fft: uses real FFTs for convolution instead of complex FFTs.
Notes
- The library is designed for real-time playback and integrates with the CLI and GUI apps.
- Many settings are driven by the
play_settings.jsonembedded in container files.
Dependencies
~6–8.5MB
~219K SLoC