grab audio loudness from correct avatar

This commit is contained in:
Zach Fox 2017-04-10 21:15:29 -07:00 committed by Zach Fox
parent 6c49db0f1b
commit 54ca8bd89e

View file

@ -11,7 +11,6 @@
#include <glm/gtx/quaternion.hpp>
#include <gpu/Batch.h>
#include <AudioClient.h>
#include <NodeList.h>
#include <recording/Deck.h>
@ -73,8 +72,13 @@ void Head::reset() {
void Head::simulate(float deltaTime, bool isMine) {
const float NORMAL_HZ = 60.0f; // the update rate the constant values were tuned for
// grab the audio loudness from the audio client
float audioLoudness = DependencyManager::get<AudioClient>()->getLastInputLoudness();
// grab the audio loudness from the owning avatar, if we have one
float audioLoudness = 0.0f;
if (_owningAvatar) {
_owningAvatar->getAudioLoudness();
}
// Update audio trailing average for rendering facial animations
const float AUDIO_AVERAGING_SECS = 0.05f;