pub struct SoundData {
pub samples: Vec<f32>,
pub channels: u16,
pub sample_rate: u32,
}Expand description
Represents a sound asset, decoded and ready for playback.
This struct holds audio data in a normalized, interleaved f32 format,
which is the standard for high-quality audio processing pipelines.
The AssetAgent will manage instances of this type in its cache.
Fields§
§samples: Vec<f32>The raw, interleaved audio samples.
For stereo, samples are ordered [L, R, L, R, ...].
Values are expected to be in the range [-1.0, 1.0].
channels: u16The number of channels in the audio data (e.g., 1 for mono, 2 for stereo).
sample_rate: u32The number of samples per second (e.g., 44100 Hz).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SoundData
impl RefUnwindSafe for SoundData
impl Send for SoundData
impl Sync for SoundData
impl Unpin for SoundData
impl UnwindSafe for SoundData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more