Browse Source

Pointless refactoring

tags/v0.4.0
Andrew Belt 7 years ago
parent
commit
ebe533c6e9
2 changed files with 2 additions and 10 deletions
  1. +1
    -5
      src/Branches.cpp
  2. +1
    -5
      src/Clouds.cpp

+ 1
- 5
src/Branches.cpp View File

@@ -69,11 +69,7 @@ static void computeChannel(const float *in, const float *p, float threshold, flo

void Branches::step() {
computeChannel(inputs[IN1_INPUT], inputs[P1_INPUT], params[THRESHOLD1_PARAM], params[MODE1_PARAM], &lastGate[0], &outcome[0], outputs[OUT1A_OUTPUT], outputs[OUT1B_OUTPUT], &light[0]);

if(inputs[IN2_INPUT])
computeChannel(inputs[IN2_INPUT], inputs[P2_INPUT], params[THRESHOLD2_PARAM], params[MODE2_PARAM], &lastGate[1], &outcome[1], outputs[OUT2A_OUTPUT], outputs[OUT2B_OUTPUT], &light[1]);
else
computeChannel(inputs[IN1_INPUT], inputs[P2_INPUT], params[THRESHOLD2_PARAM], params[MODE2_PARAM], &lastGate[1], &outcome[1], outputs[OUT2A_OUTPUT], outputs[OUT2B_OUTPUT], &light[1]);
computeChannel(inputs[IN2_INPUT] ? inputs[IN2_INPUT] : inputs[IN1_INPUT], inputs[P2_INPUT], params[THRESHOLD2_PARAM], params[MODE2_PARAM], &lastGate[1], &outcome[1], outputs[OUT2A_OUTPUT], outputs[OUT2B_OUTPUT], &light[1]);
}




+ 1
- 5
src/Clouds.cpp View File

@@ -77,11 +77,7 @@ void Clouds::step() {
if (!inputBuffer.full()) {
Frame<2> inputFrame;
inputFrame.samples[0] = getf(inputs[IN_L_INPUT]) * params[IN_GAIN_PARAM] / 5.0;
if(inputs[IN_R_INPUT])
inputFrame.samples[1] = getf(inputs[IN_R_INPUT]) * params[IN_GAIN_PARAM] / 5.0;
else
inputFrame.samples[1] = getf(inputs[IN_L_INPUT]) * params[IN_GAIN_PARAM] / 5.0;

inputFrame.samples[1] = inputs[IN_R_INPUT] ? getf(inputs[IN_R_INPUT]) * params[IN_GAIN_PARAM] / 5.0 : inputFrame.samples[0];
inputBuffer.push(inputFrame);
}



Loading…
Cancel
Save