diff --git a/modules/juce_dsp/containers/juce_AudioBlock.h b/modules/juce_dsp/containers/juce_AudioBlock.h index 35cdaa1597..6d6169b9cd 100644 --- a/modules/juce_dsp/containers/juce_AudioBlock.h +++ b/modules/juce_dsp/containers/juce_AudioBlock.h @@ -457,16 +457,16 @@ public: //============================================================================== /** Multiplies each channels of this block by a smoothly changing value. */ - template - AudioBlock& multiplyBy (SmoothedValue& value) noexcept { multiplyByInternal (value); return *this; } - template - const AudioBlock& multiplyBy (SmoothedValue& value) const noexcept { multiplyByInternal (value); return *this; } + template + AudioBlock& multiplyBy (SmoothedValue& value) noexcept { multiplyByInternal (value); return *this; } + template + const AudioBlock& multiplyBy (SmoothedValue& value) const noexcept { multiplyByInternal (value); return *this; } /** Replaces each channel of this block with the product of the src block and a smoothed value. */ - template - AudioBlock& replaceWithProductOf (AudioBlock src, SmoothedValue& value) noexcept { replaceWithProductOfInternal (src, value); return *this; } - template - const AudioBlock& replaceWithProductOf (AudioBlock src, SmoothedValue& value) const noexcept { replaceWithProductOfInternal (src, value); return *this; } + template + AudioBlock& replaceWithProductOf (AudioBlock src, SmoothedValue& value) noexcept { replaceWithProductOfInternal (src, value); return *this; } + template + const AudioBlock& replaceWithProductOf (AudioBlock src, SmoothedValue& value) const noexcept { replaceWithProductOfInternal (src, value); return *this; } //============================================================================== /** Multiplies each value in src by a fixed value and adds the result to this block. */ @@ -547,10 +547,10 @@ public: AudioBlock& operator*= (AudioBlock src) noexcept { return multiplyBy (src); } const AudioBlock& operator*= (AudioBlock src) const noexcept { return multiplyBy (src); } - template - AudioBlock& operator*= (SmoothedValue& value) noexcept { return multiplyBy (value); } - template - const AudioBlock& operator*= (SmoothedValue& value) const noexcept { return multiplyBy (value); } + template + AudioBlock& operator*= (SmoothedValue& value) noexcept { return multiplyBy ((NumericType) value); } + template + const AudioBlock& operator*= (SmoothedValue& value) const noexcept { return multiplyBy ((NumericType) value); } //============================================================================== // This class can only be used with floating point types @@ -756,18 +756,18 @@ private: FloatVectorOperations::multiply (getDataPointer (ch), src1.getDataPointer (ch), src2.getDataPointer (ch), n); } - template - void multiplyByInternal (SmoothedValue& value) const noexcept + template + void multiplyByInternal (SmoothedValue& value) const noexcept { if (! value.isSmoothing()) { - multiplyByInternal (value.getTargetValue()); + multiplyByInternal ((NumericType) value.getTargetValue()); } else { for (size_t i = 0; i < numSamples; ++i) { - const auto scaler = value.getNextValue(); + const auto scaler = (NumericType) value.getNextValue(); for (size_t ch = 0; ch < numChannels; ++ch) getDataPointer (ch)[i] *= scaler; @@ -775,14 +775,14 @@ private: } } - template - void replaceWithProductOfInternal (AudioBlock src, SmoothedValue& value) const noexcept + template + void replaceWithProductOfInternal (AudioBlock src, SmoothedValue& value) const noexcept { jassert (numChannels == src.numChannels); if (! value.isSmoothing()) { - replaceWithProductOfInternal (src, value.getTargetValue()); + replaceWithProductOfInternal (src, (NumericType) value.getTargetValue()); } else { @@ -790,7 +790,7 @@ private: for (size_t i = 0; i < n; ++i) { - const auto scaler = value.getNextValue(); + const auto scaler = (NumericType) value.getNextValue(); for (size_t ch = 0; ch < numChannels; ++ch) getDataPointer (ch)[i] = scaler * src.getChannelPointer (ch)[i];