30 jassert (inputSource !=
nullptr);
32 for (
int i = 2; --i >= 0;)
41 for (
int i = iirFilters.size(); --i >= 0;)
47 for (
int i = iirFilters.size(); --i >= 0;)
48 iirFilters.getUnchecked (i)->makeInactive();
56 for (
int i = iirFilters.size(); --i >= 0;)
57 iirFilters.getUnchecked (i)->reset();
62 input->releaseResources();
69 const int numChannels =
bufferToFill.buffer->getNumChannels();
71 while (numChannels > iirFilters.size())
72 iirFilters.add (
new IIRFilter (*iirFilters.getUnchecked (0)));
74 for (
int i = 0; i < numChannels; ++i)
75 iirFilters.getUnchecked (i)
Base class for objects that can produce a continuous stream of audio.
A set of coefficients for use in an IIRFilter object.
void makeInactive()
Calls IIRFilter::makeInactive() on all the filters being used internally.
void prepareToPlay(int samplesPerBlockExpected, double sampleRate) override
Tells the source to prepare for playing.
void setCoefficients(const IIRCoefficients &newCoefficients)
Changes the filter to use the same parameters as the one being passed in.
IIRFilterAudioSource(AudioSource *inputSource, bool deleteInputWhenDeleted)
Creates a IIRFilterAudioSource for a given input source.
void releaseResources() override
Allows the source to release anything it no longer needs after playback has stopped.
~IIRFilterAudioSource() override
Destructor.
void getNextAudioBlock(const AudioSourceChannelInfo &) override
Called repeatedly to fetch subsequent blocks of audio data.
An IIR filter that can perform low, high, or band-pass filtering on an audio signal,...
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
Used by AudioSource::getNextAudioBlock().