#[non_exhaustive]pub enum Threshold {
Auto,
Abs(f32),
BelowRef(f32),
}Expand description
Where a frame turns from silence to sound.
For PCM analyses the values are in dB; for external scores they are probabilities.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Auto
Derived from the file itself, with hysteresis.
For PCM, signal-free frames are left out, floor is the 10th percentile of frame levels
and ref the 99th. Sound starts at max(floor + 4, min(floor + 6, ref − 20)) dB and ends
3 dB below that. If that onset exceeds ref, it is lowered to floor to retain steady
sound. This also retains steady background noise; use Self::Abs to remove it at a
known level. For scores, sound starts at 0.5 and ends below 0.35.
Abs(f32)
A fixed level: dBFS for PCM, probability for scores.
BelowRef(f32)
This far below the 99th percentile frame value: dB for PCM, probability for scores.
Trait Implementations§
impl Copy for Threshold
impl StructuralPartialEq for Threshold
Auto Trait Implementations§
impl Freeze for Threshold
impl RefUnwindSafe for Threshold
impl Send for Threshold
impl Sync for Threshold
impl Unpin for Threshold
impl UnsafeUnpin for Threshold
impl UnwindSafe for Threshold
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