mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 09:43:25 +02:00
Merge pull request #2442 from birarda/master
change delta to 2%, don't hit 1 for cutoff
This commit is contained in:
commit
42de3047ab
1 changed files with 3 additions and 3 deletions
|
@ -379,7 +379,7 @@ void AudioMixer::run() {
|
|||
const float STRUGGLE_TRIGGER_SLEEP_PERCENTAGE_THRESHOLD = 0.10f;
|
||||
const float BACK_OFF_TRIGGER_SLEEP_PERCENTAGE_THRESHOLD = 0.20f;
|
||||
const float CUTOFF_EPSILON = 0.0001f;
|
||||
const float CUTOFF_DELTA = 0.05;
|
||||
const float CUTOFF_DELTA = 0.02f;
|
||||
|
||||
const float CURRENT_FRAME_RATIO = 1.0f / TRAILING_AVERAGE_FRAMES;
|
||||
const float PREVIOUS_FRAMES_RATIO = 1.0f - CURRENT_FRAME_RATIO;
|
||||
|
@ -399,8 +399,8 @@ void AudioMixer::run() {
|
|||
// we're struggling - change our min required loudness to reduce some load
|
||||
audabilityCutoffRatio += CUTOFF_DELTA;
|
||||
|
||||
if (audabilityCutoffRatio > 1) {
|
||||
audabilityCutoffRatio = 1;
|
||||
if (audabilityCutoffRatio >= 1) {
|
||||
audabilityCutoffRatio = 1 - CUTOFF_DELTA;
|
||||
}
|
||||
|
||||
qDebug() << "Mixer is struggling, sleeping" << _trailingSleepRatio * 100 << "% of frame time. Old cutoff was"
|
||||
|
|
Loading…
Reference in a new issue