Barotrauma Client Doc
Barotrauma.Sounds.LowpassFilter Class Reference

Used to apply a lowpass-filter to a signal. More...

Inheritance diagram for Barotrauma.Sounds.LowpassFilter:
Barotrauma.Sounds.BiQuad

Public Member Functions

 LowpassFilter (int sampleRate, double frequency)
 Initializes a new instance of the LowpassFilter class. More...
 
- Public Member Functions inherited from Barotrauma.Sounds.BiQuad
float Process (float input)
 Processes a single input sample and returns the result. More...
 
void Process (float[] input)
 Processes multiple input samples. More...
 

Protected Member Functions

override void CalculateBiQuadCoefficients ()
 Calculates all coefficients. More...
 
- Protected Member Functions inherited from Barotrauma.Sounds.BiQuad
 BiQuad (int sampleRate, double frequency, double q, double gainDb)
 Initializes a new instance of the BiQuad class. More...
 

Additional Inherited Members

- Protected Attributes inherited from Barotrauma.Sounds.BiQuad
double A0
 The a0 value. More...
 
double A1
 The a1 value. More...
 
double A2
 The a2 value. More...
 
double B1
 The b1 value. More...
 
double B2
 The b2 value. More...
 
readonly double _q
 The q value. More...
 
readonly double _gainDB
 The gain value in dB. More...
 
double Z1
 The z1 value. More...
 
double Z2
 The z2 value. More...
 
readonly double _frequency
 
readonly int _sampleRate
 Gets the sample rate. More...
 
- Static Protected Attributes inherited from Barotrauma.Sounds.BiQuad
static readonly double DefaultQ = 1.0 / Math.Sqrt(2)
 
const double DefaultGainDb = 6.0
 

Detailed Description

Used to apply a lowpass-filter to a signal.

Definition at line 168 of file SoundFilters.cs.

Constructor & Destructor Documentation

◆ LowpassFilter()

Barotrauma.Sounds.LowpassFilter.LowpassFilter ( int  sampleRate,
double  frequency 
)

Initializes a new instance of the LowpassFilter class.

Parameters
sampleRateThe sample rate.
frequencyThe filter's corner frequency.

Definition at line 175 of file SoundFilters.cs.

Member Function Documentation

◆ CalculateBiQuadCoefficients()

override void Barotrauma.Sounds.LowpassFilter.CalculateBiQuadCoefficients ( )
protectedvirtual

Calculates all coefficients.

Implements Barotrauma.Sounds.BiQuad.

Definition at line 183 of file SoundFilters.cs.