pub enum SetSampleOffset {
Low(u8),
High(RangedU8<0, 0x0F>),
}Expand description
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§
Trait Implementations§
Source§impl Clone for SetSampleOffset
impl Clone for SetSampleOffset
Source§fn clone(&self) -> SetSampleOffset
fn clone(&self) -> SetSampleOffset
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more