pub struct AudioBuf { /* private fields */ }Expand description
Audio buffer descriptor (borrowed from the C layer).
Implementations§
Source§impl AudioBuf
impl AudioBuf
Sourcepub fn data_s16_mut(&self) -> &mut [i16]
pub fn data_s16_mut(&self) -> &mut [i16]
Get a mutable slice of interleaved S16 samples.
&self is intentional: the underlying buffer is C-owned and the
AudioProcessor trait passes the output buf as &AudioBuf (so a
processor can read in / write out through one reference each).
Aliasing safety is the C side’s responsibility.
Auto Trait Implementations§
impl Freeze for AudioBuf
impl RefUnwindSafe for AudioBuf
impl !Send for AudioBuf
impl !Sync for AudioBuf
impl Unpin for AudioBuf
impl UnsafeUnpin for AudioBuf
impl UnwindSafe for AudioBuf
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