From 3db8386743f6792bfeb2850425d38601b709623d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 24 Mar 2014 15:46:02 -0700 Subject: [PATCH] suppress trailing sleep ratio debug --- assignment-client/src/audio/AudioMixer.cpp | 8 -------- assignment-client/src/avatars/AvatarMixer.cpp | 10 +--------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/assignment-client/src/audio/AudioMixer.cpp b/assignment-client/src/audio/AudioMixer.cpp index f7092cd4ae..5aeedd24f3 100644 --- a/assignment-client/src/audio/AudioMixer.cpp +++ b/assignment-client/src/audio/AudioMixer.cpp @@ -440,10 +440,6 @@ void AudioMixer::run() { bool hasRatioChanged = false; if (framesSinceCutoffEvent >= TRAILING_AVERAGE_FRAMES) { - if (framesSinceCutoffEvent % TRAILING_AVERAGE_FRAMES == 0) { - qDebug() << "Current trailing sleep ratio:" << _trailingSleepRatio; - } - if (_trailingSleepRatio <= STRUGGLE_TRIGGER_SLEEP_PERCENTAGE_THRESHOLD) { // we're struggling - change our min required loudness to reduce some load _performanceThrottlingRatio = _performanceThrottlingRatio + (0.5f * (1.0f - _performanceThrottlingRatio)); @@ -473,10 +469,6 @@ void AudioMixer::run() { } } - if (!hasRatioChanged) { - ++framesSinceCutoffEvent; - } - foreach (const SharedNodePointer& node, nodeList->getNodeHash()) { if (node->getType() == NodeType::Agent && node->getActiveSocket() && node->getLinkedData() && ((AudioMixerClientData*) node->getLinkedData())->getAvatarAudioRingBuffer()) { diff --git a/assignment-client/src/avatars/AvatarMixer.cpp b/assignment-client/src/avatars/AvatarMixer.cpp index 09f6923f40..b302c9bdf0 100644 --- a/assignment-client/src/avatars/AvatarMixer.cpp +++ b/assignment-client/src/avatars/AvatarMixer.cpp @@ -31,7 +31,7 @@ const unsigned int AVATAR_DATA_SEND_INTERVAL_USECS = (1 / 60.0) * 1000 * 1000; AvatarMixer::AvatarMixer(const QByteArray& packet) : ThreadedAssignment(packet), - _trailingSleepRatio(0.0f), + _trailingSleepRatio(1.0f), _performanceThrottlingRatio(0.0f), _sumListeners(0), _numStatFrames(0) @@ -324,10 +324,6 @@ void AvatarMixer::run() { bool hasRatioChanged = false; if (framesSinceCutoffEvent >= TRAILING_AVERAGE_FRAMES) { - if (framesSinceCutoffEvent % TRAILING_AVERAGE_FRAMES == 0) { - qDebug() << "Current trailing sleep ratio:" << _trailingSleepRatio; - } - if (_trailingSleepRatio <= STRUGGLE_TRIGGER_SLEEP_PERCENTAGE_THRESHOLD) { // we're struggling - change our min required loudness to reduce some load _performanceThrottlingRatio = _performanceThrottlingRatio + (0.5f * (1.0f - _performanceThrottlingRatio)); @@ -353,10 +349,6 @@ void AvatarMixer::run() { } } - if (!hasRatioChanged) { - ++framesSinceCutoffEvent; - } - broadcastAvatarData(); if (identityTimer.elapsed() >= AVATAR_IDENTITY_KEYFRAME_MSECS) {