pub struct AudioFrameMut { /* private fields */ }
Expand description
An audio frame with mutable data.
Implementations§
Source§impl AudioFrameMut
impl AudioFrameMut
Sourcepub fn silence(
channel_layout: &ChannelLayoutRef,
sample_format: SampleFormat,
sample_rate: u32,
samples: usize,
) -> Self
pub fn silence( channel_layout: &ChannelLayoutRef, sample_format: SampleFormat, sample_rate: u32, samples: usize, ) -> Self
Create an audio frame containing silence. The time base of the frame will be in microseconds.
Sourcepub fn sample_format(&self) -> SampleFormat
pub fn sample_format(&self) -> SampleFormat
Get frame sample format.
Sourcepub fn sample_rate(&self) -> u32
pub fn sample_rate(&self) -> u32
Get frame sample rate.
Sourcepub fn planes_mut(&mut self) -> PlanesMut<'_>
pub fn planes_mut(&mut self) -> PlanesMut<'_>
Get mutable sample data planes for this frame.
Sourcepub fn channel_layout(&self) -> &ChannelLayoutRef
pub fn channel_layout(&self) -> &ChannelLayoutRef
Get channel layout.
Sourcepub fn with_time_base(self, time_base: TimeBase) -> Self
pub fn with_time_base(self, time_base: TimeBase) -> Self
Set frame time base. (This will rescale the current timestamp into a given time base.)
Sourcepub fn freeze(self) -> AudioFrame
pub fn freeze(self) -> AudioFrame
Make the frame immutable.
Trait Implementations§
Source§impl Drop for AudioFrameMut
impl Drop for AudioFrameMut
Source§impl<'a> From<&'a AudioFrameMut> for Planes<'a>
impl<'a> From<&'a AudioFrameMut> for Planes<'a>
Source§fn from(frame: &'a AudioFrameMut) -> Self
fn from(frame: &'a AudioFrameMut) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a mut AudioFrameMut> for PlanesMut<'a>
impl<'a> From<&'a mut AudioFrameMut> for PlanesMut<'a>
Source§fn from(frame: &'a mut AudioFrameMut) -> Self
fn from(frame: &'a mut AudioFrameMut) -> Self
Converts to this type from the input type.
impl Send for AudioFrameMut
impl Sync for AudioFrameMut
Auto Trait Implementations§
impl Freeze for AudioFrameMut
impl RefUnwindSafe for AudioFrameMut
impl Unpin for AudioFrameMut
impl UnwindSafe for AudioFrameMut
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