pub trait SampleSource {
// Required methods
fn len(&self) -> usize;
fn loop_start(&self) -> usize;
fn loop_end(&self) -> usize;
fn loop_kind(&self) -> LoopKind;
fn at(&self, idx: usize) -> f32;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
Read-only view into a tracker sample body.
Implementations must return samples in the range -1.0..=1.0. The
caller (the MixerVoice) manages the fractional read position, so
at takes an integer sample index.
Required Methods§
Sourcefn loop_start(&self) -> usize
fn loop_start(&self) -> usize
Loop start index (frames).
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".