mirror of
https://github.com/lubosz/overte.git
synced 2025-04-25 01:03:59 +02:00
Merge pull request #2446 from birarda/master
fix a boneheaded mistake in trailing average for AudioRingBuffer loudness
This commit is contained in:
commit
9e39c65d1c
2 changed files with 3 additions and 4 deletions
|
@ -449,7 +449,6 @@ void AudioMixer::run() {
|
|||
}
|
||||
}
|
||||
|
||||
qDebug() << "There were" << _numClientsMixedInFrame << "clients mixed in the last frame";
|
||||
_numClientsMixedInFrame = 0;
|
||||
|
||||
// push forward the next output pointers for any audio buffers we used
|
||||
|
|
|
@ -68,9 +68,9 @@ void AudioRingBuffer::updateAverageLoudnessForBoundarySamples(int numSamples) {
|
|||
nextLoudness /= MAX_SAMPLE_VALUE;
|
||||
|
||||
const int TRAILING_AVERAGE_FRAMES = 100;
|
||||
const float CURRENT_FRAME_RATIO = 1 / TRAILING_AVERAGE_FRAMES;
|
||||
const float PREVIOUS_FRAMES_RATIO = 1 - CURRENT_FRAME_RATIO;
|
||||
const float LOUDNESS_EPSILON = 0.001;
|
||||
const float CURRENT_FRAME_RATIO = 1.0f / TRAILING_AVERAGE_FRAMES;
|
||||
const float PREVIOUS_FRAMES_RATIO = 1.0f - CURRENT_FRAME_RATIO;
|
||||
const float LOUDNESS_EPSILON = 0.01f;
|
||||
|
||||
if (nextLoudness >= _averageLoudness) {
|
||||
_averageLoudness = nextLoudness;
|
||||
|
|
Loading…
Reference in a new issue