OpenShot Audio Library | OpenShotAudio: juce::IIRFilter Class Reference

OpenShot Audio Library | OpenShotAudio 0.3.2

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
juce::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
IIRFilter & | operator= (const IIRFilter &)=delete

## Protected Attributes
SpinLock | processLock
IIRCoefficients | coefficients
float | v1 = 0
float | v2 = 0
bool | active = false

## Detailed Description

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

See also
  IIRCoefficient, IIRFilterAudioSource

Definition at line 156 of file juce_audio_basics/utilities/juce_IIRFilter.h.

## Constructor & Destructor Documentation

## ◆ IIRFilter() [1/2]

juce::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.

Definition at line 261 of file juce_audio_basics/utilities/juce_IIRFilter.cpp.

## ◆ IIRFilter() [2/2]

juce::IIRFilter::IIRFilter | ( | const IIRFilter & | other | ) |
| noexcept

Creates a copy of another filter.

Definition at line 265 of file juce_audio_basics/utilities/juce_IIRFilter.cpp.

## ◆ ~IIRFilter()

juce::IIRFilter::~IIRFilter | ( |  | ) |
| noexcept

Destructor.

Definition at line 271 of file juce_audio_basics/utilities/juce_IIRFilter.cpp.

## Member Function Documentation

## ◆ getCoefficients()

IIRCoefficients juce::IIRFilter::getCoefficients | ( |  | ) | const
| inlinenoexcept

Returns the coefficients that this filter is using.

Definition at line 182 of file juce_audio_basics/utilities/juce_IIRFilter.h.

## ◆ makeInactive()

void juce::IIRFilter::makeInactive | ( |  | ) |
| noexcept

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

Definition at line 276 of file juce_audio_basics/utilities/juce_IIRFilter.cpp.

## ◆ processSamples()

void juce::IIRFilter::processSamples | ( | float * | samples,
|  | int | numSamples
| ) |  |
| noexcept

Performs the filter operation on the given set of samples.

Definition at line 308 of file juce_audio_basics/utilities/juce_IIRFilter.cpp.

## ◆ processSingleSampleRaw()

float juce::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.

Definition at line 296 of file juce_audio_basics/utilities/juce_IIRFilter.cpp.

## ◆ reset()

void juce::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.

Definition at line 290 of file juce_audio_basics/utilities/juce_IIRFilter.cpp.

## ◆ setCoefficients()

void juce::IIRFilter::setCoefficients | ( | const IIRCoefficients & | newCoefficients | ) |
| noexcept

Applies a set of coefficients to this filter.

Definition at line 282 of file juce_audio_basics/utilities/juce_IIRFilter.cpp.

## Member Data Documentation

## ◆ active

bool juce::IIRFilter::active = false
| protected

Definition at line 208 of file juce_audio_basics/utilities/juce_IIRFilter.h.

## ◆ coefficients

IIRCoefficients juce::IIRFilter::coefficients
| protected

Definition at line 206 of file juce_audio_basics/utilities/juce_IIRFilter.h.

## ◆ processLock

SpinLock juce::IIRFilter::processLock
| protected

Definition at line 205 of file juce_audio_basics/utilities/juce_IIRFilter.h.

## ◆ v1

float juce::IIRFilter::v1 = 0
| protected

Definition at line 207 of file juce_audio_basics/utilities/juce_IIRFilter.h.

## ◆ v2

float juce::IIRFilter::v2 = 0
| protected

Definition at line 207 of file juce_audio_basics/utilities/juce_IIRFilter.h.

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

- juce_audio_basics/utilities/juce_IIRFilter.h
- juce_audio_basics/utilities/juce_IIRFilter.cpp