1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

LinearSmoothedValue: Added some helpful member functions and deprecated setValue

This commit is contained in:
reuk 2019-02-11 15:16:37 +00:00 committed by Tom Poole
parent 097525ba5b
commit b8278cec0e
11 changed files with 105 additions and 79 deletions

View file

@ -1006,13 +1006,13 @@ private:
for (auto i = 0; i < 2; ++i)
{
changeVolumes[i].setValue (1.0f);
changeVolumes[i].setTargetValue (1.0f);
changeVolumes[i].reset (currentInfo.sampleRate, 0.05);
changeVolumes[i].setValue (0.0f);
changeVolumes[i].setTargetValue (0.0f);
changeVolumes[i + 2].setValue (0.0f);
changeVolumes[i + 2].setTargetValue (0.0f);
changeVolumes[i + 2].reset (currentInfo.sampleRate, 0.05);
changeVolumes[i + 2].setValue (1.0f);
changeVolumes[i + 2].setTargetValue (1.0f);
}
@ -1235,13 +1235,13 @@ void Convolution::processSamples (const AudioBlock<float>& input, AudioBlock<flo
for (size_t channel = 0; channel < numChannels; ++channel)
{
volumeDry[channel].setValue (isBypassed ? 0.0f : 1.0f);
volumeDry[channel].setTargetValue (isBypassed ? 0.0f : 1.0f);
volumeDry[channel].reset (sampleRate, 0.05);
volumeDry[channel].setValue (isBypassed ? 1.0f : 0.0f);
volumeDry[channel].setTargetValue (isBypassed ? 1.0f : 0.0f);
volumeWet[channel].setValue (isBypassed ? 1.0f : 0.0f);
volumeWet[channel].setTargetValue (isBypassed ? 1.0f : 0.0f);
volumeWet[channel].reset (sampleRate, 0.05);
volumeWet[channel].setValue (isBypassed ? 0.0f : 1.0f);
volumeWet[channel].setTargetValue (isBypassed ? 0.0f : 1.0f);
}
}
}