OpenShot Library | libopenshot-audio
0.2.0
|
27 const bool deleteInputWhenDeleted)
28 : input (inputSource, deleteInputWhenDeleted)
30 jassert (inputSource !=
nullptr);
32 for (
int i = 2; --i >= 0;)
41 for (
int i = iirFilters.size(); --i >= 0;)
42 iirFilters.getUnchecked(i)->setCoefficients (newCoefficients);
47 for (
int i = iirFilters.size(); --i >= 0;)
48 iirFilters.getUnchecked(i)->makeInactive();
54 input->prepareToPlay (samplesPerBlockExpected, sampleRate);
56 for (
int i = iirFilters.size(); --i >= 0;)
57 iirFilters.getUnchecked(i)->reset();
62 input->releaseResources();
67 input->getNextAudioBlock (bufferToFill);
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)
A set of coefficients for use in an IIRFilter object.
Base class for objects that can produce a continuous stream of audio.
void getNextAudioBlock(const AudioSourceChannelInfo &) override
Called repeatedly to fetch subsequent blocks of audio data.
Type * getWritePointer(int channelNumber) noexcept
Returns a writeable pointer to one of the buffer's channels.
void releaseResources() override
Allows the source to release anything it no longer needs after playback has stopped.
int startSample
The first sample in the buffer from which the callback is expected to write data.
~IIRFilterAudioSource() override
Destructor.
int numSamples
The number of samples in the buffer which the callback is expected to fill with data.
int getNumChannels() const noexcept
Returns the number of channels of audio data that this buffer contains.
AudioBuffer< float > * buffer
The destination buffer to fill with audio data.
Used by AudioSource::getNextAudioBlock().
IIRFilterAudioSource(AudioSource *inputSource, bool deleteInputWhenDeleted)
Creates a IIRFilterAudioSource for a given input source.
void setCoefficients(const IIRCoefficients &newCoefficients)
Changes the filter to use the same parameters as the one being passed in.
void prepareToPlay(int samplesPerBlockExpected, double sampleRate) override
Tells the source to prepare for playing.
An IIR filter that can perform low, high, or band-pass filtering on an audio signal.
void makeInactive()
Calls IIRFilter::makeInactive() on all the filters being used internally.