Skip to main content

StereoIntervalScripts

Struct StereoIntervalScripts 

Source
pub struct StereoIntervalScripts<'a> {
    pub mid: SilkFrameSymbols<'a>,
    pub side: Option<SilkFrameSymbols<'a>>,
}
Expand description

One 20 ms time interval’s symbol scripts for a stereo SILK-only packet (§4.2.2): the mid-channel SILK frame plus, when the side channel is coded for this interval, the side-channel SILK frame.

Consistency rules enforced by encode_silk_only_packet_stereo (mirroring the decode-side §4.2.7.1 / §4.2.7.2 gating):

  • mid.header.stereo must be Some (the §4.2.7.1 weights ride on every mid frame); side.header.stereo must be None.
  • The interval’s side VAD flag is derived as “side coded with an active frame type (2..=5)”. When it is set, the §4.2.7.2 mid-only flag is absent (mid.header.mid_only_flag == None). When it is unset, the flag is present and must equal side.is_none(): Some(true) skips the side frame entirely, Some(false) codes an inactive side frame (frame type 0..=1).

Fields§

§mid: SilkFrameSymbols<'a>

The mid-channel frame script (carries the §4.2.7.1 weights and, when signalled, the §4.2.7.2 mid-only flag).

§side: Option<SilkFrameSymbols<'a>>

The side-channel frame script, or None when the side channel is not coded for this interval (mid-only).

Trait Implementations§

Source§

impl<'a> Clone for StereoIntervalScripts<'a>

Source§

fn clone(&self) -> StereoIntervalScripts<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for StereoIntervalScripts<'a>

Source§

impl<'a> Debug for StereoIntervalScripts<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.