mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:19:05 +02:00
Merge pull request #3457 from chansensturm/audio-noise
Set default for head-penumbra filter to off
This commit is contained in:
commit
36c6099864
3 changed files with 5 additions and 3 deletions
|
@ -67,7 +67,7 @@
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"label": "Enable Positional Filter",
|
"label": "Enable Positional Filter",
|
||||||
"help": "If enabled, positional audio stream uses lowpass filter",
|
"help": "If enabled, positional audio stream uses lowpass filter",
|
||||||
"default": true
|
"default": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,6 +75,8 @@ public:
|
||||||
- (_b1 * _ym1)
|
- (_b1 * _ym1)
|
||||||
- (_b2 * _ym2);
|
- (_b2 * _ym2);
|
||||||
|
|
||||||
|
y = (y >= -EPSILON && y < EPSILON) ? 0.0f : y; // clamp to 0
|
||||||
|
|
||||||
// update delay line
|
// update delay line
|
||||||
_xm2 = _xm1;
|
_xm2 = _xm1;
|
||||||
_xm1 = x;
|
_xm1 = x;
|
||||||
|
|
|
@ -40,8 +40,8 @@ void AudioSourceTone::updateCoefficients() {
|
||||||
|
|
||||||
void AudioSourceTone::initialize() {
|
void AudioSourceTone::initialize() {
|
||||||
const float32_t FREQUENCY_220_HZ = 220.0f;
|
const float32_t FREQUENCY_220_HZ = 220.0f;
|
||||||
const float32_t GAIN_MINUS_3DB = 0.708f;
|
const float32_t GAIN_MINUS_6DB = 0.501f;
|
||||||
setParameters(SAMPLE_RATE, FREQUENCY_220_HZ, GAIN_MINUS_3DB);
|
setParameters(SAMPLE_RATE, FREQUENCY_220_HZ, GAIN_MINUS_6DB);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioSourceTone::setParameters(const float32_t sampleRate, const float32_t frequency, const float32_t amplitude) {
|
void AudioSourceTone::setParameters(const float32_t sampleRate, const float32_t frequency, const float32_t amplitude) {
|
||||||
|
|
Loading…
Reference in a new issue