This commit is contained in:
Ken Cooke 2017-05-23 15:33:37 -07:00
parent c47d80574e
commit f3797798d3

View file

@ -627,20 +627,6 @@ void Agent::encodeFrameOfZeros(QByteArray& encodedZeros) {
}
void Agent::computeLoudness(const QByteArray* decodedBuffer, QSharedPointer<ScriptableAvatar> scriptableAvatar) {
//float loudness = 0.0f;
//if (decodedBuffer) {
// auto soundData = reinterpret_cast<const int16_t*>(decodedBuffer->constData());
// int numFrames = decodedBuffer->size() / sizeof(int16_t);
// // now iterate and come up with average
// if (numFrames > 0) {
// for(int i = 0; i < numFrames; i++) {
// loudness += (float) std::abs(soundData[i]);
// }
// loudness /= numFrames;
// }
//}
//scriptableAvatar->setAudioLoudness(loudness);
float lastInputLoudness = 0.0f;
if (decodedBuffer) {
auto samples = reinterpret_cast<const int16_t*>(decodedBuffer->constData());