浏览代码

Alternative fix without signed overflow issues

dds
user 4 年前
父节点
当前提交
abeaf94520
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      synth_waveform.cpp

+ 1
- 1
synth_waveform.cpp 查看文件

bp = moddata->data; bp = moddata->data;
for (i=0; i < AUDIO_BLOCK_SAMPLES; i++) { for (i=0; i < AUDIO_BLOCK_SAMPLES; i++) {
// more than +/- 180 deg shift by 32 bit overflow of "n" // more than +/- 180 deg shift by 32 bit overflow of "n"
uint32_t n = (*bp++) * modulation_factor;
uint32_t n = ((uint32_t)(*bp++)) * modulation_factor;
phasedata[i] = ph + n; phasedata[i] = ph + n;
ph += inc; ph += inc;
} }

正在加载...
取消
保存