Skip to main content

Module sample

Module sample 

Source
Expand description

Precision routing for f32 / f64.

Sealed to those two types. Authors rarely name the traits โ€” use Float for math helpers, Sample for buffer/DSP surfaces.

use aura_params::sample::Float;
let v: f64 = 0.5f32.to_f64();
let back: f32 = f32::from_f64(v);

Traitsยง

Float
Math on f32 or f64 (gains, freqs, coefficients โ€” not necessarily samples).
Sample
Float plus Default + Send + Sync + 'static for buffers and scratch.