Enum ittech::SetSampleOffset [−][src]
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 Option
s 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]
fn clone(&self) -> SetSampleOffset
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SetSampleOffset
[src]
impl Debug for SetSampleOffset
[src]
impl PartialEq<SetSampleOffset> for SetSampleOffset
[src]
fn eq(&self, other: &SetSampleOffset) -> bool
[src]
fn ne(&self, other: &SetSampleOffset) -> bool
[src]
impl StructuralPartialEq for SetSampleOffset
[src]
Auto Trait Implementations
impl RefUnwindSafe for SetSampleOffset
[src]
impl Send for SetSampleOffset
[src]
impl Sync for SetSampleOffset
[src]
impl Unpin for SetSampleOffset
[src]
impl UnwindSafe for SetSampleOffset
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,