openshot-audio  0.1.2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IIRFilter Class Reference

#include <juce_IIRFilter.h>

Public Member Functions

 IIRFilter () noexcept
 
 IIRFilter (const IIRFilter &) noexcept
 
 ~IIRFilter () noexcept
 
void makeInactive () noexcept
 
void setCoefficients (const IIRCoefficients &newCoefficients) noexcept
 
IIRCoefficients getCoefficients () const noexcept
 
void reset () noexcept
 
void processSamples (float *samples, int numSamples) noexcept
 
float processSingleSampleRaw (float sample) noexcept
 

Protected Member Functions

IIRFilteroperator= (const IIRFilter &)
 

Protected Attributes

SpinLock processLock
 
IIRCoefficients coefficients
 
float v1
 
float v2
 
bool active
 

Detailed Description

An IIR filter that can perform low, high, or band-pass filtering on an audio signal.

See also
IIRCoefficient, IIRFilterAudioSource

Constructor & Destructor Documentation

IIRFilter::IIRFilter ( )
noexcept

Creates a filter.

Initially the filter is inactive, so will have no effect on samples that you process with it. Use the setCoefficients() method to turn it into the type of filter needed.

IIRFilter::IIRFilter ( const IIRFilter other)
noexcept

Creates a copy of another filter.

IIRFilter::~IIRFilter ( )
noexcept

Destructor.

Member Function Documentation

IIRCoefficients IIRFilter::getCoefficients ( ) const
inlinenoexcept

Returns the coefficients that this filter is using.

void IIRFilter::makeInactive ( )
noexcept

Clears the filter so that any incoming data passes through unchanged.

IIRFilter& IIRFilter::operator= ( const IIRFilter )
protected
void IIRFilter::processSamples ( float *  samples,
int  numSamples 
)
noexcept

Performs the filter operation on the given set of samples.

float IIRFilter::processSingleSampleRaw ( float  sample)
noexcept

Processes a single sample, without any locking or checking.

Use this if you need fast processing of a single value, but be aware that this isn't thread-safe in the way that processSamples() is.

void IIRFilter::reset ( )
noexcept

Resets the filter's processing pipeline, ready to start a new stream of data.

Note that this clears the processing state, but the type of filter and its coefficients aren't changed. To put a filter into an inactive state, use the makeInactive() method.

void IIRFilter::setCoefficients ( const IIRCoefficients newCoefficients)
noexcept

Applies a set of coefficients to this filter.

Member Data Documentation

bool IIRFilter::active
protected
IIRCoefficients IIRFilter::coefficients
protected
SpinLock IIRFilter::processLock
protected
float IIRFilter::v1
protected
float IIRFilter::v2
protected

The documentation for this class was generated from the following files: