Pārlūkot izejas kodu

tidy away debug

dds
user pirms 4 gadiem
vecāks
revīzija
911beaed32
1 mainītis faili ar 0 papildinājumiem un 4 dzēšanām
  1. +0
    -4
      synth_waveform.cpp

+ 0
- 4
synth_waveform.cpp Parādīt failu

} }


sample += (int16_t) ((((uint64_t)phase_word * (2*BASE_AMPLITUDE)) >> 32) - BASE_AMPLITUDE) ; // generate the sloped part of the wave sample += (int16_t) ((((uint64_t)phase_word * (2*BASE_AMPLITUDE)) >> 32) - BASE_AMPLITUDE) ; // generate the sloped part of the wave
//printf ("phases , %x %x\n", phase_word, new_phase) ;


if (new_phase < DEG180 && phase_word >= DEG180) // detect wrap around, correct dc offset if (new_phase < DEG180 && phase_word >= DEG180) // detect wrap around, correct dc offset
{
//printf ("Trigger dc offset at 0 deg, %lu %lu (%lu)\n", phase_word, new_phase, DEG180) ;
dc_offset += 2*BASE_AMPLITUDE ; dc_offset += 2*BASE_AMPLITUDE ;
}


return sample ; return sample ;
} }

Notiek ielāde…
Atcelt
Saglabāt