pub struct AudioFrame<'a> { /* private fields */ }
Expand description
Represents an audio frame, with sample format and channels
Implementations§
Source§impl<'a> AudioFrame<'a>
impl<'a> AudioFrame<'a>
Sourcepub fn new(format: SampleFormat<'a>, channels: u32) -> Self
pub fn new(format: SampleFormat<'a>, channels: u32) -> Self
Create the audio frame
Sourcepub fn format(&self) -> &SampleFormat<'_>
pub fn format(&self) -> &SampleFormat<'_>
Returns the sample format for this frame
Sourcepub fn nb_samples(&self) -> usize
pub fn nb_samples(&self) -> usize
Returns the number of samples contained in this frame
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for AudioFrame<'a>
impl<'a> RefUnwindSafe for AudioFrame<'a>
impl<'a> Send for AudioFrame<'a>
impl<'a> Sync for AudioFrame<'a>
impl<'a> Unpin for AudioFrame<'a>
impl<'a> UnwindSafe for AudioFrame<'a>
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