portability/boost
zetaPRIME 2019-01-04 15:36:13 -05:00
parent 3dba27fb81
commit f41af3a0ec
1 changed files with 1 additions and 2 deletions

View File

@ -57,7 +57,6 @@ void TestSynth::init() {
void TestSynth::reset() {
osc = 0.0;
osc2 = 0.0;
cvol = 0.0;
tvol = 0.0;
noteId = 0;
@ -89,7 +88,7 @@ void TestSynth::process() {
if (tvol > cvol) cvol += 64.0 / audioEngine->curSampleRate();
else if (tvol < cvol) cvol -= 16.0 / audioEngine->curSampleRate();
cvol = std::clamp(cvol, 0.0, 1.0);
if (cvol == 0.0) { osc = osc2 = 0.0; }
if (cvol == 0.0) { osc = 0.0; }
float oscV = static_cast<float>(fOsc(osc) * std::pow(cvol*.5, 4));
double enote = note + std::sin(lfo * PI*2) * 0.1;