179 void reset() noexcept;
184 template <typename ProcessContext,
185 std::enable_if_t<std::is_same_v<typename ProcessContext::SampleType,
float>,
int> = 0>
186 void process (const ProcessContext& context) noexcept
188 processSamples (context.getInputBlock(), context.getOutputBlock(), context.isBypassed);
192 enum class Stereo { no, yes };
193 enum class Trim { no, yes };
194 enum class Normalise { no, yes };
216 void loadImpulseResponse (
const void* sourceData,
size_t sourceDataSize,
217 Stereo isStereo, Trim requiresTrimming,
size_t size,
218 Normalise requiresNormalisation = Normalise::yes);
231 void loadImpulseResponse (
const File& fileImpulseResponse,
232 Stereo isStereo, Trim requiresTrimming,
size_t size,
233 Normalise requiresNormalisation = Normalise::yes);
252 void loadImpulseResponse (AudioBuffer<float>&& buffer,
double bufferSampleRate,
253 Stereo isStereo, Trim requiresTrimming, Normalise requiresNormalisation);
256 int getCurrentIRSize()
const;
264 int getLatency()
const;
268 Convolution (
const Latency&,
270 OptionalScopedPointer<ConvolutionMessageQueue>&&);
272 void processSamples (
const AudioBlock<const float>&, AudioBlock<float>&,
bool isBypassed)
noexcept;
277 void prepare (
const ProcessSpec&);
279 template <
typename ProcessWet>
280 void processSamples (
const AudioBlock<const float>&,
283 ProcessWet&&) noexcept;
288 std::array<SmoothedValue<
float>, 2> volumeDry, volumeWet;
289 AudioBlock<
float> dryBlock;
290 HeapBlock<
char> dryBlockStorage;
291 double sampleRate = 0;
292 bool currentIsBypassed = false;
297 std::unique_ptr<Impl> pimpl;
301 bool isActive = false;
304 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Convolution)