mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:08:00 +02:00
DC filter cutoff at 0.5Hz
This commit is contained in:
parent
4a253023ee
commit
684b7fee5a
1 changed files with 4 additions and 4 deletions
|
@ -25,10 +25,10 @@ static inline int32_t saturateQ30(int32_t x) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// First-order DC-blocking filter, with zero at 1.0 and pole at 0.99994
|
// First-order DC-blocking filter, with zero at 1.0 and pole at 0.9999
|
||||||
//
|
//
|
||||||
// -3dB @ 0.5 Hz (48KHz)
|
// -3dB @ 1.0 Hz (48KHz)
|
||||||
// -3dB @ 0.2 Hz (24KHz)
|
// -3dB @ 0.5 Hz (24KHz)
|
||||||
//
|
//
|
||||||
// input in Q15, output in Q30
|
// input in Q15, output in Q30
|
||||||
//
|
//
|
||||||
|
@ -41,7 +41,7 @@ public:
|
||||||
|
|
||||||
x <<= 15; // scale to Q30
|
x <<= 15; // scale to Q30
|
||||||
x -= _dcOffset; // remove DC
|
x -= _dcOffset; // remove DC
|
||||||
_dcOffset += x >> 14; // pole = (1.0 - 2^-14) = 0.99994
|
_dcOffset += x >> 13; // pole = (1.0 - 2^-13) = 0.9999
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue