ソースを参照

Merge pull request #362 from MarkTillotson/fix_phase_modulation

Fix phase modulation
dds
Paul Stoffregen 4年前
コミット
b8a88653f1
コミッターのメールアドレスに関連付けられたアカウントが存在しません
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 = (uint16_t)(*bp++) * modulation_factor;
uint32_t n = ((uint32_t)(*bp++)) * modulation_factor;
phasedata[i] = ph + n; phasedata[i] = ph + n;
ph += inc; ph += inc;
} }

読み込み中…
キャンセル
保存