mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added a new templated SmoothedValue class
This commit is contained in:
parent
5bdd3ea8c6
commit
4751e9d41a
20 changed files with 743 additions and 486 deletions
|
|
@ -486,7 +486,8 @@ public:
|
|||
}
|
||||
|
||||
/** Multiplies all channels of the AudioBlock by a smoothly changing value and stores them . */
|
||||
AudioBlock& multiply (LinearSmoothedValue<SampleType>& value) noexcept
|
||||
template <typename SmoothingType>
|
||||
AudioBlock& multiply (SmoothedValue<SampleType, SmoothingType>& value) noexcept
|
||||
{
|
||||
if (! value.isSmoothing())
|
||||
{
|
||||
|
|
@ -507,7 +508,8 @@ public:
|
|||
}
|
||||
|
||||
/** Multiplies all channels of the source by a smoothly changing value and stores them in the receiver. */
|
||||
AudioBlock& multiply (AudioBlock src, LinearSmoothedValue<SampleType>& value) noexcept
|
||||
template <typename SmoothingType>
|
||||
AudioBlock& multiply (AudioBlock src, SmoothedValue<SampleType, SmoothingType>& value) noexcept
|
||||
{
|
||||
jassert (numChannels == src.numChannels);
|
||||
|
||||
|
|
@ -632,7 +634,8 @@ public:
|
|||
forcedinline AudioBlock& operator-= (AudioBlock src) noexcept { return subtract (src); }
|
||||
forcedinline AudioBlock& JUCE_VECTOR_CALLTYPE operator*= (SampleType src) noexcept { return multiply (src); }
|
||||
forcedinline AudioBlock& operator*= (AudioBlock src) noexcept { return multiply (src); }
|
||||
forcedinline AudioBlock& operator*= (LinearSmoothedValue<SampleType>& value) noexcept { return multiply (value); }
|
||||
template <typename SmoothingType>
|
||||
forcedinline AudioBlock& operator*= (SmoothedValue<SampleType, SmoothingType>& value) noexcept { return multiply (value); }
|
||||
|
||||
//==============================================================================
|
||||
// This class can only be used with floating point types
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue