Since commit b7d6a6ea, libxmp has added an extra step to voice
positions if they are close to or at the end of their loop on a tick
boundary. This results in samples with loops being very slightly
too fast. This patch corrects this behavior so samples with loops
play at the correct speed.
The issue can be demonstrated with two looping samples, where one
sample is two inverted copies of the other sample. When played back
at the same pitch, they should cancel entirely and be silent, but
this extra step causes them to gradually diverge instead.
Keep sine vibrato as a table, and generate other waveforms in code.
Note: S3M/IT square wave has a minimum value of 0 while MOD/XM doesn't,
but we're using the S3M waveform for everyone.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Low value in square wave should be 0, not -255. Also fix ramp up waveform
index to 4, and leave 3 as the random waveform.
To check: is ramp up actually used by any format? And is vibrato depth
ok in MOD/S3M/XM? It does seem correct in IT.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
The regression test suite is important for development but for end user
tests a simpler check is sufficient.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>