pub struct AudioFilterChain { /* private fields */ }Expand description
An ordered -af chain plus the resample target it requests, if any.
Implementations§
Source§impl AudioFilterChain
impl AudioFilterChain
Sourcepub fn parse(spec: &str) -> Result<AudioFilterChain>
pub fn parse(spec: &str) -> Result<AudioFilterChain>
Parse an FFmpeg-style -af spec. Empty/blank yields a pass-through chain.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
True when no per-frame work is queued (aresample alone still counts as
empty here: the engine’s resampler performs it).
Sourcepub fn resample_target(&self) -> Option<u32>
pub fn resample_target(&self) -> Option<u32>
The output sample rate an aresample in the chain asked for.
Sourcepub fn apply(
&mut self,
frame: AudioFrame,
t: Option<f64>,
) -> Result<Option<AudioFrame>>
pub fn apply( &mut self, frame: AudioFrame, t: Option<f64>, ) -> Result<Option<AudioFrame>>
Run the chain on one frame. t is the frame’s start time in seconds
(output-relative). Returns None when trimming consumed the whole frame.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioFilterChain
impl RefUnwindSafe for AudioFilterChain
impl Send for AudioFilterChain
impl Sync for AudioFilterChain
impl Unpin for AudioFilterChain
impl UnsafeUnpin for AudioFilterChain
impl UnwindSafe for AudioFilterChain
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