Sfoglia il codice sorgente

Fix WAVEFORM_TRIANGLE at less than 1.0 amplitude

dds
PaulStoffregen 6 anni fa
parent
commit
bf96e81da6
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      synth_waveform.cpp

+ 2
- 2
synth_waveform.cpp Vedi File

@@ -122,7 +122,7 @@ void AudioSynthWaveform::update(void)
if (phtop == 1 || phtop == 2) {
*bp++ = ((0xFFFF - (ph >> 15)) * magnitude) >> 16;
} else {
*bp++ = ((ph >> 15) * magnitude) >> 16;
*bp++ = (((int32_t)ph >> 15) * magnitude) >> 16;
}
ph += inc;
}
@@ -373,7 +373,7 @@ void AudioSynthWaveformModulated::update(void)
if (phtop == 1 || phtop == 2) {
*bp++ = ((0xFFFF - (ph >> 15)) * magnitude) >> 16;
} else {
*bp++ = ((ph >> 15) * magnitude) >> 16;
*bp++ = (((int32_t)ph >> 15) * magnitude) >> 16;
}
}
break;

Loading…
Annulla
Salva