mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-06 04:00:08 +00:00
Made IIRCoefficients constructor public.
This commit is contained in:
parent
c5f1e86cb3
commit
34fccfa4f3
2 changed files with 19 additions and 12 deletions
|
|
@ -163,19 +163,19 @@ IIRCoefficients IIRCoefficients::makePeakFilter (const double sampleRate,
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
IIRFilter::IIRFilter()
|
||||
: active (false), v1 (0), v2 (0)
|
||||
IIRFilter::IIRFilter() noexcept
|
||||
: v1 (0), v2 (0), active (false)
|
||||
{
|
||||
}
|
||||
|
||||
IIRFilter::IIRFilter (const IIRFilter& other)
|
||||
: active (other.active), v1 (0), v2 (0)
|
||||
IIRFilter::IIRFilter (const IIRFilter& other) noexcept
|
||||
: v1 (0), v2 (0), active (other.active)
|
||||
{
|
||||
const SpinLock::ScopedLockType sl (other.processLock);
|
||||
coefficients = other.coefficients;
|
||||
}
|
||||
|
||||
IIRFilter::~IIRFilter()
|
||||
IIRFilter::~IIRFilter() noexcept
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,15 @@ public:
|
|||
//==============================================================================
|
||||
/** Creates a null set of coefficients (which will produce silence). */
|
||||
IIRCoefficients() noexcept;
|
||||
|
||||
/** Directly constructs an object from the raw coefficients.
|
||||
Most people will want to use the static methods instead of this, but
|
||||
the constructor is public to allow tinkerers to create their own custom
|
||||
filters!
|
||||
*/
|
||||
IIRCoefficients (double c1, double c2, double c3,
|
||||
double c4, double c5, double c6) noexcept;
|
||||
|
||||
/** Creates a copy of another filter. */
|
||||
IIRCoefficients (const IIRCoefficients&) noexcept;
|
||||
/** Creates a copy of another filter. */
|
||||
|
|
@ -91,8 +100,6 @@ public:
|
|||
|
||||
private:
|
||||
friend class IIRFilter;
|
||||
IIRCoefficients (double, double, double, double, double, double) noexcept;
|
||||
|
||||
float c[5];
|
||||
};
|
||||
|
||||
|
|
@ -113,13 +120,13 @@ public:
|
|||
you process with it. Use the setCoefficients() method to turn it into the
|
||||
type of filter needed.
|
||||
*/
|
||||
IIRFilter();
|
||||
IIRFilter() noexcept;
|
||||
|
||||
/** Creates a copy of another filter. */
|
||||
IIRFilter (const IIRFilter& other);
|
||||
IIRFilter (const IIRFilter&) noexcept;
|
||||
|
||||
/** Destructor. */
|
||||
~IIRFilter();
|
||||
~IIRFilter() noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** Clears the filter so that any incoming data passes through unchanged. */
|
||||
|
|
@ -129,7 +136,7 @@ public:
|
|||
void setCoefficients (const IIRCoefficients& newCoefficients) noexcept;
|
||||
|
||||
/** Returns the coefficients that this filter is using. */
|
||||
IIRCoefficients getCoefficients() const { return coefficients; }
|
||||
IIRCoefficients getCoefficients() const noexcept { return coefficients; }
|
||||
|
||||
//==============================================================================
|
||||
/** Resets the filter's processing pipeline, ready to start a new stream of data.
|
||||
|
|
@ -153,9 +160,9 @@ public:
|
|||
protected:
|
||||
//==============================================================================
|
||||
SpinLock processLock;
|
||||
bool active;
|
||||
IIRCoefficients coefficients;
|
||||
float v1, v2;
|
||||
bool active;
|
||||
|
||||
IIRFilter& operator= (const IIRFilter&);
|
||||
JUCE_LEAK_DETECTOR (IIRFilter)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue