Kaynağa Gözat

fix phase modulation not to treat phase modulation data as unsigned before multiplying

dds
user 4 yıl önce
ebeveyn
işleme
ce8348301e
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. +1
    -1
      synth_waveform.cpp

+ 1
- 1
synth_waveform.cpp Dosyayı Görüntüle

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 = (*bp++) * modulation_factor;
phasedata[i] = ph + n; phasedata[i] = ph + n;
ph += inc; ph += inc;
} }

Yükleniyor…
İptal
Kaydet