Enum ittech::SetSampleOffset[][src]

pub enum SetSampleOffset {
    Low(u8),
    High(RangedU8<0, 0x0F>),
}

Effects Oxx and SAy combined

The offset into the sample is represented in the number of samples, in hexadecimal 0xyxx00, where y is configured by SetSampleOffset::High and xx by SetSampleOffset::Low.

We're not going to be handling memory with Options the type system like with other commands here because the handling is a bit inconsistent.

Recalling of the High part can be done using [EffectCmd::Set(None)] if it was the previously used Sxx command.

Recalling of the Low part can be done with EffectCmd::Offset(SetSampleOffset::Low(0x0)) this makes it impossible to use an offset of for example O00 + SA1 (0x10000), which the OpenMPT GUI happily hints at but then it doesn't actually work in the player. O00 does recall the last value and it's weirdly stateful in that even if you remove all the other instances of SAy and Oxx and play the pattern from the beginning it seems to remember the last offset.

We leave this encoded as a full range u8 and don't treat the zero specially.

Variants

Low(u8)
High(RangedU8<0, 0x0F>)

Trait Implementations

impl Clone for SetSampleOffset[src]

impl Copy for SetSampleOffset[src]

impl Debug for SetSampleOffset[src]

impl PartialEq<SetSampleOffset> for SetSampleOffset[src]

impl StructuralPartialEq for SetSampleOffset[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.