Skip to main content

Crate br41ndmg

Crate br41ndmg 

Source
Expand description

br41ndmg — a polyphase sinc audio resampler for Rust.

The crate resamples f32 audio with a precomputed polyphase sinc filter bank. It exposes offline and streaming APIs, reads/writes WAV files, and (with the default flac feature) decodes FLAC input.

§Quick start

use br41ndmg::Resampler;

let resampler = Resampler::new(44_100.0_f32, 48_000.0_f32)?;
let input = vec![0.0_f32; 1024];
let output = resampler.resample(&input)?;

See the Resampler and StreamingResampler types for processing, and io for file helpers.

Re-exports§

pub use error::ResampleError;
pub use io::AudioBuffer;
pub use polyphase::PolyphaseFilterParams;
pub use resampler::Resampler;
pub use resampler::StreamingResampler;
pub use window::Window;

Modules§

error
Error type for the crate.
filter
Windowed-sinc FIR kernel builders (f64 and f32).
io
Offline audio file I/O.
polyphase
Polyphase sinc filter-bank construction and phase lookup.
resampler
sinc
Numerically safe sinc helpers and sinc-kernel builders (f64 and f32).
tags
Tag (metadata) reading and WAV LIST INFO writing.
utils
window
Window functions used to truncate the sinc kernel into a finite FIR filter.