pub struct LtcSignalParams {
pub sample_rate: u32,
pub amplitude: f32,
pub fps: u8,
}Expand description
Parameters controlling the LTC audio signal generation.
Fields§
§sample_rate: u32Audio sample rate in Hz (e.g. 48000).
amplitude: f32Peak amplitude of the generated signal (0.0 .. 1.0).
fps: u8Frame rate (fps) of the timecode being encoded.
Implementations§
Source§impl LtcSignalParams
impl LtcSignalParams
Sourcepub fn default_25fps() -> Self
pub fn default_25fps() -> Self
Create default params: 48 kHz, amplitude 0.5, 25 fps.
Sourcepub fn default_30fps() -> Self
pub fn default_30fps() -> Self
Create params for 30fps NTSC at 48 kHz.
Sourcepub fn samples_per_bit(&self) -> f64
pub fn samples_per_bit(&self) -> f64
Samples per LTC bit at this sample rate and frame rate.
LTC has 80 bits per frame, so samples_per_frame / 80.
Sourcepub fn samples_per_frame(&self) -> u32
pub fn samples_per_frame(&self) -> u32
Total audio samples per timecode frame.
Trait Implementations§
Source§impl Clone for LtcSignalParams
impl Clone for LtcSignalParams
Source§fn clone(&self) -> LtcSignalParams
fn clone(&self) -> LtcSignalParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LtcSignalParams
impl Debug for LtcSignalParams
Source§impl PartialEq for LtcSignalParams
impl PartialEq for LtcSignalParams
impl Copy for LtcSignalParams
impl StructuralPartialEq for LtcSignalParams
Auto Trait Implementations§
impl Freeze for LtcSignalParams
impl RefUnwindSafe for LtcSignalParams
impl Send for LtcSignalParams
impl Sync for LtcSignalParams
impl Unpin for LtcSignalParams
impl UnsafeUnpin for LtcSignalParams
impl UnwindSafe for LtcSignalParams
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