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.