pub struct LtcReader { /* private fields */ }Expand description
LTC reader
Implementations§
Source§impl LtcReader
impl LtcReader
Sourcepub fn new(config: LtcReaderConfig) -> Self
pub fn new(config: LtcReaderConfig) -> Self
Create a new LTC reader with configuration
Sourcepub fn process_samples(
&mut self,
samples: &[f32],
) -> Result<Option<Timecode>, TimecodeError>
pub fn process_samples( &mut self, samples: &[f32], ) -> Result<Option<Timecode>, TimecodeError>
Process audio samples and attempt to decode timecode
Sourcepub fn sync_confidence(&self) -> f32
pub fn sync_confidence(&self) -> f32
Get the current sync confidence (0.0 to 1.0)
Trait Implementations§
Source§impl TimecodeReader for LtcReader
impl TimecodeReader for LtcReader
Source§fn read_timecode(&mut self) -> Result<Option<Timecode>, TimecodeError>
fn read_timecode(&mut self) -> Result<Option<Timecode>, TimecodeError>
Return the most recently decoded timecode.
Audio samples must be submitted via LtcReader::process_samples
before this method can return Some(timecode). Calling
read_timecode without first feeding samples will always return
Ok(None) because no frames have been decoded yet.
This design keeps the TimecodeReader trait pull-based: callers that
own the sample source feed chunks via process_samples, then poll
read_timecode to retrieve completed frames.
Source§fn frame_rate(&self) -> FrameRate
fn frame_rate(&self) -> FrameRate
Get the current frame rate
Source§fn is_synchronized(&self) -> bool
fn is_synchronized(&self) -> bool
Check if the reader is synchronized
Auto Trait Implementations§
impl Freeze for LtcReader
impl RefUnwindSafe for LtcReader
impl Send for LtcReader
impl Sync for LtcReader
impl Unpin for LtcReader
impl UnsafeUnpin for LtcReader
impl UnwindSafe for LtcReader
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