Represents a biquad-filter.
More...
|
| float | Process (float input) |
| | Processes a single input sample and returns the result. More...
|
| |
| void | Process (float[] input) |
| | Processes multiple input samples. More...
|
| |
Represents a biquad-filter.
Definition at line 45 of file SoundFilters.cs.
◆ BiQuad()
| Barotrauma.Sounds.BiQuad.BiQuad |
( |
int |
sampleRate, |
|
|
double |
frequency, |
|
|
double |
q, |
|
|
double |
gainDb |
|
) |
| |
|
protected |
Initializes a new instance of the BiQuad class.
- Parameters
-
| sampleRate | The sample rate. |
| frequency | The frequency. |
| q | The q. |
- Exceptions
-
| System.ArgumentOutOfRangeException | sampleRate or frequency or q |
Definition at line 108 of file SoundFilters.cs.
◆ CalculateBiQuadCoefficients()
| abstract void Barotrauma.Sounds.BiQuad.CalculateBiQuadCoefficients |
( |
| ) |
|
|
protectedpure virtual |
◆ Process() [1/2]
| float Barotrauma.Sounds.BiQuad.Process |
( |
float |
input | ) |
|
Processes a single input sample and returns the result.
- Parameters
-
| input | The input sample to process. |
- Returns
- The result of the processed input sample.
Definition at line 138 of file SoundFilters.cs.
◆ Process() [2/2]
| void Barotrauma.Sounds.BiQuad.Process |
( |
float[] |
input | ) |
|
Processes multiple input samples.
- Parameters
-
| input | The input samples to process. |
The result of the calculation gets stored within the input array.
Definition at line 151 of file SoundFilters.cs.
◆ _frequency
| readonly double Barotrauma.Sounds.BiQuad._frequency |
|
protected |
◆ _gainDB
| readonly double Barotrauma.Sounds.BiQuad._gainDB |
|
protected |
◆ _q
| readonly double Barotrauma.Sounds.BiQuad._q |
|
protected |
◆ _sampleRate
| readonly int Barotrauma.Sounds.BiQuad._sampleRate |
|
protected |
◆ A0
| double Barotrauma.Sounds.BiQuad.A0 |
|
protected |
◆ A1
| double Barotrauma.Sounds.BiQuad.A1 |
|
protected |
◆ A2
| double Barotrauma.Sounds.BiQuad.A2 |
|
protected |
◆ B1
| double Barotrauma.Sounds.BiQuad.B1 |
|
protected |
◆ B2
| double Barotrauma.Sounds.BiQuad.B2 |
|
protected |
◆ DefaultGainDb
| const double Barotrauma.Sounds.BiQuad.DefaultGainDb = 6.0 |
|
staticprotected |
◆ DefaultQ
| readonly double Barotrauma.Sounds.BiQuad.DefaultQ = 1.0 / Math.Sqrt(2) |
|
staticprotected |
◆ Z1
| double Barotrauma.Sounds.BiQuad.Z1 |
|
protected |
◆ Z2
| double Barotrauma.Sounds.BiQuad.Z2 |
|
protected |