ref: 01b9e3faabace3855a6fcd8cae6c253aeee28206
parent: 29c3c9e5c9ce8debcd419eac92d841a2e26c7483
author: Chris Moeller <kode54@gmail.com>
date: Thu Aug 1 05:29:49 EDT 2013
- I didn't realize that sigrenderer->tick counted down from speed to 1, rather than up from 0 to speed-1, so every other format's arpeggios were backwards except for XM. Fixed. - Mask tick count to 0-31 so it can't overflow the arpeggio tables.
--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -4186,10 +4186,10 @@
}
else*/
{
- int tick = sigrenderer->tick;
- if ((sigrenderer->sigdata->flags & (IT_WAS_AN_XM|IT_WAS_A_MOD))==IT_WAS_AN_XM)
+ int tick = sigrenderer->tick - 1;
+ if ((sigrenderer->sigdata->flags & (IT_WAS_AN_XM|IT_WAS_A_MOD))!=IT_WAS_AN_XM)
tick = sigrenderer->speed - tick - 1;
- playing->delta *= (float)pow(DUMB_SEMITONE_BASE, channel->arpeggio_offsets[channel->arpeggio_table[tick]]);
+ playing->delta *= (float)pow(DUMB_SEMITONE_BASE, channel->arpeggio_offsets[channel->arpeggio_table[tick&31]]);
}
/*
}*/