floats are important

This commit is contained in:
Stephen Birarda 2014-03-21 18:44:59 -07:00
parent abd6c8a747
commit af4fb26031
2 changed files with 3 additions and 4 deletions

View file

@ -449,7 +449,6 @@ void AudioMixer::run() {
} }
} }
qDebug() << "There were" << _numClientsMixedInFrame << "clients mixed in the last frame";
_numClientsMixedInFrame = 0; _numClientsMixedInFrame = 0;
// push forward the next output pointers for any audio buffers we used // push forward the next output pointers for any audio buffers we used

View file

@ -68,9 +68,9 @@ void AudioRingBuffer::updateAverageLoudnessForBoundarySamples(int numSamples) {
nextLoudness /= MAX_SAMPLE_VALUE; nextLoudness /= MAX_SAMPLE_VALUE;
const int TRAILING_AVERAGE_FRAMES = 100; const int TRAILING_AVERAGE_FRAMES = 100;
const float CURRENT_FRAME_RATIO = 1 / TRAILING_AVERAGE_FRAMES; const float CURRENT_FRAME_RATIO = 1.0f / TRAILING_AVERAGE_FRAMES;
const float PREVIOUS_FRAMES_RATIO = 1 - CURRENT_FRAME_RATIO; const float PREVIOUS_FRAMES_RATIO = 1.0f - CURRENT_FRAME_RATIO;
const float LOUDNESS_EPSILON = 0.001; const float LOUDNESS_EPSILON = 0.01f;
if (nextLoudness >= _averageLoudness) { if (nextLoudness >= _averageLoudness) {
_averageLoudness = nextLoudness; _averageLoudness = nextLoudness;