Sfoglia il codice sorgente

revert a change made to wrong branch

dds
user 4 anni fa
parent
commit
c8415c3077
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. +2
    -3
      synth_tonesweep.cpp

+ 2
- 3
synth_tonesweep.cpp Vedi File

@@ -97,14 +97,13 @@ void AudioSynthToneSweep::update(void)
if(block) {
bp = block->data;
uint32_t tmp = tone_freq >> 32;
uint64_t tone_tmp = (tone_freq << 14) / (int) AUDIO_SAMPLE_RATE_EXACT;
uint64_t incr = (tone_incr << 14) / (int) AUDIO_SAMPLE_RATE_EXACT;
uint64_t tone_tmp = (0x400000000000LL * (int)(tmp&0x7fffffff)) / (int) AUDIO_SAMPLE_RATE_EXACT;
// Generate the sweep
for(i = 0;i < AUDIO_BLOCK_SAMPLES;i++) {
*bp++ = (short)(( (short)(arm_sin_q31((uint32_t)((tone_phase >> 15)&0x7fffffff))>>16) *tone_amp) >> 15);

tone_phase += tone_tmp;
tone_tmp += incr ;
if(tone_phase & 0x800000000000LL)tone_phase &= 0x7fffffffffffLL;

if(tone_sign > 0) {
if(tmp > tone_hi) {

Loading…
Annulla
Salva