pub struct AudioFrame { /* private fields */ }
Expand description
An audio frame with immutable data.
Implementations§
source§impl AudioFrame
impl AudioFrame
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 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 try_into_mut(self) -> Result<AudioFrameMut, AudioFrame>
pub fn try_into_mut(self) -> Result<AudioFrameMut, AudioFrame>
Try to make this frame mutable. Returns AudioFrameMut if it can be made into mutable without copying the data, otherwise returns AudioFrame.
sourcepub fn into_mut(self) -> AudioFrameMut
pub fn into_mut(self) -> AudioFrameMut
Make this frame mutable. This will copy the data if it is not already mutable.
Trait Implementations§
source§impl Clone for AudioFrame
impl Clone for AudioFrame
source§impl Drop for AudioFrame
impl Drop for AudioFrame
source§impl<'a> From<&'a AudioFrame> for Planes<'a>
impl<'a> From<&'a AudioFrame> for Planes<'a>
source§fn from(frame: &'a AudioFrame) -> Self
fn from(frame: &'a AudioFrame) -> Self
Converts to this type from the input type.