Barotrauma Client Doc
Barotrauma.Sounds.NotchFilter Class Reference

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

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

Public Member Functions

 NotchFilter (int sampleRate, double frequency)
 Initializes a new instance of the NotchFilter 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 notch-filter to a signal.

Definition at line 258 of file SoundFilters.cs.

Constructor & Destructor Documentation

◆ NotchFilter()

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

Initializes a new instance of the NotchFilter class.

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

Definition at line 265 of file SoundFilters.cs.

Member Function Documentation

◆ CalculateBiQuadCoefficients()

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

Calculates all coefficients.

Implements Barotrauma.Sounds.BiQuad.

Definition at line 273 of file SoundFilters.cs.