Trait bevy::audio::CpalSample
pub unsafe trait CpalSample: Copy + Clone {
const FORMAT: SampleFormat;
fn to_f32(&self) -> f32;
fn to_i16(&self) -> i16;
fn to_u16(&self) -> u16;
fn from<S>(s: &S) -> Self
where
S: Sample;
}
Expand description
Trait for containers that contain PCM data.
Required Associated Constants§
const FORMAT: SampleFormat
const FORMAT: SampleFormat
The SampleFormat
corresponding to this data type.