Applies a gain to audio samples as single samples or AudioBlocks.
Public Member Functions | |
| Gain () noexcept=default | |
| void | setGainLinear (FloatType newGain) noexcept |
| Applies a new gain as a linear value. | |
| void | setGainDecibels (FloatType newGainDecibels) noexcept |
| Applies a new gain as a decibel value. | |
| FloatType | getGainLinear () const noexcept |
| Returns the current gain as a linear value. | |
| FloatType | getGainDecibels () const noexcept |
| Returns the current gain in decibels. | |
| void | setRampDurationSeconds (double newDurationSeconds) noexcept |
| Sets the length of the ramp used for smoothing gain changes. | |
| double | getRampDurationSeconds () const noexcept |
| Returns the ramp duration in seconds. | |
| bool | isSmoothing () const noexcept |
| Returns true if the current value is currently being interpolated. | |
| void | prepare (const ProcessSpec &spec) noexcept |
| Called before processing starts. | |
| void | reset () noexcept |
| Resets the internal state of the gain. | |
| template<typename SampleType> | |
| SampleType JUCE_VECTOR_CALLTYPE | processSample (SampleType s) noexcept |
| Returns the result of processing a single sample. | |
| template<typename ProcessContext> | |
| void | process (const ProcessContext &context) noexcept |
| Processes the input and output buffers supplied in the processing context. | |
|
defaultnoexcept |
|
inlinenoexcept |
Applies a new gain as a linear value.
References setGainLinear().
Referenced by setGainDecibels(), and setGainLinear().
|
inlinenoexcept |
Applies a new gain as a decibel value.
References juce::Decibels::decibelsToGain(), and setGainLinear().
|
inlinenoexcept |
Returns the current gain as a linear value.
Referenced by getGainDecibels().
|
inlinenoexcept |
Returns the current gain in decibels.
References juce::Decibels::gainToDecibels(), and getGainLinear().
|
inlinenoexcept |
Sets the length of the ramp used for smoothing gain changes.
References juce::approximatelyEqual(), and reset().
|
inlinenoexcept |
Returns the ramp duration in seconds.
|
inlinenoexcept |
Returns true if the current value is currently being interpolated.
|
inlinenoexcept |
Called before processing starts.
References reset().
|
inlinenoexcept |
Resets the internal state of the gain.
Referenced by prepare(), and setRampDurationSeconds().
|
inlinenoexcept |
Returns the result of processing a single sample.
References JUCE_VECTOR_CALLTYPE.
|
inlinenoexcept |
Processes the input and output buffers supplied in the processing context.
References jassert, JUCE_BEGIN_IGNORE_WARNINGS_MSVC, and JUCE_END_IGNORE_WARNINGS_MSVC.