pub struct AudioBuffer {
pub samples: Arc<[f32]>,
pub sample_rate: u32,
pub channels: u16,
}Expand description
Rust-native resource registry and resource values. Decoded audio stored in Rust-owned memory.
Fields§
§samples: Arc<[f32]>Interleaved or mono PCM data.
sample_rate: u32Source sample rate in Hz.
channels: u16Number of channels in samples.
Implementations§
Trait Implementations§
Source§impl Clone for AudioBuffer
impl Clone for AudioBuffer
Source§fn clone(&self) -> AudioBuffer
fn clone(&self) -> AudioBuffer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AudioBuffer
impl RefUnwindSafe for AudioBuffer
impl Send for AudioBuffer
impl Sync for AudioBuffer
impl Unpin for AudioBuffer
impl UnwindSafe for AudioBuffer
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