OpenShot Audio Library | OpenShotAudio 0.3.2
|
#include <juce_SmoothedValue.h>
Public Types | |
using | FloatType = typename FloatTypeHelper< SmoothedValueType >::Type |
Public Member Functions | |
SmoothedValueBase ()=default | |
bool | isSmoothing () const noexcept |
FloatType | getCurrentValue () const noexcept |
FloatType | getTargetValue () const noexcept |
void | setCurrentAndTargetValue (FloatType newValue) |
void | applyGain (FloatType *samples, int numSamples) noexcept |
void | applyGain (FloatType *samplesOut, const FloatType *samplesIn, int numSamples) noexcept |
void | applyGain (AudioBuffer< FloatType > &buffer, int numSamples) noexcept |
Protected Attributes | |
FloatType | currentValue = 0 |
FloatType | target = currentValue |
int | countdown = 0 |
A base class for the smoothed value classes.
This class is used to provide common functionality to the SmoothedValue and dsp::LogRampedValue classes.
Definition at line 36 of file juce_SmoothedValue.h.
using juce::SmoothedValueBase< SmoothedValueType >::FloatType = typename FloatTypeHelper<SmoothedValueType>::Type |
Definition at line 55 of file juce_SmoothedValue.h.
|
default |
Constructor.
|
inlinevirtual |
Definition at line 61 of file juce_SmoothedValue.h.
|
inlinenoexcept |
Applies a smoothed gain to a buffer
Definition at line 126 of file juce_SmoothedValue.h.
|
inlinenoexcept |
Applies a smoothed gain to a stream of samples S[i] *= gain
samples | Pointer to a raw array of samples |
numSamples | Length of array of samples |
Definition at line 89 of file juce_SmoothedValue.h.
Referenced by juce::dsp::Convolution::Pimpl::processSamples().
|
inlinenoexcept |
Computes output as a smoothed gain applied to a stream of samples. Sout[i] = Sin[i] * gain
samplesOut | A pointer to a raw array of output samples |
samplesIn | A pointer to a raw array of input samples |
numSamples | The length of the array of samples |
Definition at line 110 of file juce_SmoothedValue.h.
|
inlinenoexcept |
Returns the current value of the ramp.
Definition at line 68 of file juce_SmoothedValue.h.
|
inlinenoexcept |
Returns the target value towards which the smoothed value is currently moving.
Definition at line 72 of file juce_SmoothedValue.h.
Referenced by juce::dsp::Oscillator< SampleType >::getFrequency().
|
inlinenoexcept |
Returns true if the current value is currently being interpolated.
Definition at line 65 of file juce_SmoothedValue.h.
Referenced by juce::SmoothedValueBase< SmoothedValueType >::applyGain(), juce::SmoothedValueBase< SmoothedValueType >::applyGain(), juce::SmoothedValueBase< SmoothedValueType >::applyGain(), juce::SmoothedValue< FloatType, SmoothingType >::getNextValue(), and juce::dsp::Oscillator< SampleType >::process().
|
inline |
Sets the current value and the target value.
newValue | the new value to take |
Definition at line 77 of file juce_SmoothedValue.h.
Referenced by juce::SmoothedValue< FloatType, SmoothingType >::reset(), juce::dsp::Oscillator< SampleType >::setFrequency(), juce::SmoothedValue< FloatType, SmoothingType >::setTargetValue(), and juce::SmoothedValue< FloatType, SmoothingType >::skip().
|
protected |
Definition at line 167 of file juce_SmoothedValue.h.
|
protected |
Definition at line 165 of file juce_SmoothedValue.h.
|
protected |
Definition at line 166 of file juce_SmoothedValue.h.