Struct crabgrab::frame::AudioFrame
source · pub struct AudioFrame { /* private fields */ }
Expand description
A frame of captured audio
Implementations§
source§impl AudioFrame
impl AudioFrame
sourcepub fn sample_rate(&self) -> AudioSampleRate
pub fn sample_rate(&self) -> AudioSampleRate
Get the sample rate of the captured audio
sourcepub fn channel_count(&self) -> AudioChannelCount
pub fn channel_count(&self) -> AudioChannelCount
Get the channel count of the captured audio
sourcepub fn audio_channel_buffer(
&mut self,
channel: usize
) -> Result<AudioChannelData<'_>, AudioBufferError>
pub fn audio_channel_buffer( &mut self, channel: usize ) -> Result<AudioChannelData<'_>, AudioBufferError>
Get the data buffer for the captured audio channel
sourcepub fn origin_time(&self) -> Duration
pub fn origin_time(&self) -> Duration
Get the time since the start of the stream that this audio frame begins at
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioFrame
impl RefUnwindSafe for AudioFrame
impl Unpin for AudioFrame
impl UnwindSafe for AudioFrame
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