Fixes per code review

This commit is contained in:
Philip Rosedale 2013-04-24 13:12:08 -07:00
parent 055e62c165
commit 33f95c696b
4 changed files with 6 additions and 13 deletions

View file

@ -510,7 +510,7 @@ error:
}
const float Audio::getInputLoudness() {
float Audio::getInputLoudness() const {
return audioData->lastInputLoudness;
}

View file

@ -25,7 +25,7 @@ public:
bool getMixerLoopbackFlag();
void setMixerLoopbackFlag(bool newMixerLoopbackFlag);
const float getInputLoudness();
float getInputLoudness() const;
void updateMixerParams(in_addr_t mixerAddress, in_port_t mixerPort);
void setWalkingState(bool newWalkState);

View file

@ -567,12 +567,9 @@ void Head::simulate(float deltaTime) {
}
}
//
// Update audio trailing average for rendering facial animations
//
const float AUDIO_AVERAGING_SECS = 0.05;
_head.averageLoudness = (1.f - deltaTime / AUDIO_AVERAGING_SECS)*_head.averageLoudness +
_head.averageLoudness = (1.f - deltaTime / AUDIO_AVERAGING_SECS) * _head.averageLoudness +
(deltaTime / AUDIO_AVERAGING_SECS) * _audioLoudness;
}
@ -748,11 +745,9 @@ void Head::renderHead(bool lookingInMirror) {
}
glPopMatrix();
//
// Update audio attack data for facial animation (eyebrows and mouth)
//
_head.audioAttack = 0.9 * _head.audioAttack + 0.1 * fabs(_audioLoudness - _head.lastLoudness);
_head.audioAttack = 0.9 * _head.audioAttack + 0.1 * fabs(_audioLoudness - _head.lastLoudness);
_head.lastLoudness = _audioLoudness;

View file

@ -482,10 +482,8 @@ void updateAvatar(float frametime)
const float YAW_SENSITIVITY = 1.0;
// If enabled, Update render pitch and yaw based on gyro data
if (::gyroLook)
{
if (::gyroLook) {
if (fabs(gyroYawRate) > MIN_YAW_RATE) {
//if (fabs(myAvatar.getHeadYaw()) > MIN_YAW_ANGLE) {
myAvatar.addBodyYaw(-gyroYawRate * YAW_SENSITIVITY * frametime);
}
}