wrap freq lookup index

This commit is contained in:
twobit 2012-08-06 15:51:12 +02:00
parent 6308e1fe85
commit 2dd9f75836

View File

@ -227,7 +227,7 @@ uint16_t synth_mix(void)
synth_channel_t* chan = &channels[i];
const synth_instrument_t* inst = &instruments[chan->inst_nr];
chan->phase += freq_table[chan->note + wave_table[chan->pos][0]];
chan->phase += freq_table[(uint8_t)(chan->note + wave_table[chan->pos][0])];
uint8_t amp;
switch(wave_table[chan->pos][1]) {