mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 19:04:27 +02:00
Fixes per code review
This commit is contained in:
parent
055e62c165
commit
33f95c696b
4 changed files with 6 additions and 13 deletions
|
@ -510,7 +510,7 @@ error:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const float Audio::getInputLoudness() {
|
float Audio::getInputLoudness() const {
|
||||||
return audioData->lastInputLoudness;
|
return audioData->lastInputLoudness;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
bool getMixerLoopbackFlag();
|
bool getMixerLoopbackFlag();
|
||||||
void setMixerLoopbackFlag(bool newMixerLoopbackFlag);
|
void setMixerLoopbackFlag(bool newMixerLoopbackFlag);
|
||||||
|
|
||||||
const float getInputLoudness();
|
float getInputLoudness() const;
|
||||||
void updateMixerParams(in_addr_t mixerAddress, in_port_t mixerPort);
|
void updateMixerParams(in_addr_t mixerAddress, in_port_t mixerPort);
|
||||||
|
|
||||||
void setWalkingState(bool newWalkState);
|
void setWalkingState(bool newWalkState);
|
||||||
|
|
|
@ -567,12 +567,9 @@ void Head::simulate(float deltaTime) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Update audio trailing average for rendering facial animations
|
// Update audio trailing average for rendering facial animations
|
||||||
//
|
|
||||||
|
|
||||||
const float AUDIO_AVERAGING_SECS = 0.05;
|
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;
|
(deltaTime / AUDIO_AVERAGING_SECS) * _audioLoudness;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -748,10 +745,8 @@ void Head::renderHead(bool lookingInMirror) {
|
||||||
}
|
}
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
//
|
|
||||||
// Update audio attack data for facial animation (eyebrows and mouth)
|
|
||||||
//
|
|
||||||
|
|
||||||
|
// 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;
|
_head.lastLoudness = _audioLoudness;
|
||||||
|
|
||||||
|
|
|
@ -482,10 +482,8 @@ void updateAvatar(float frametime)
|
||||||
const float YAW_SENSITIVITY = 1.0;
|
const float YAW_SENSITIVITY = 1.0;
|
||||||
|
|
||||||
// If enabled, Update render pitch and yaw based on gyro data
|
// If enabled, Update render pitch and yaw based on gyro data
|
||||||
if (::gyroLook)
|
if (::gyroLook) {
|
||||||
{
|
|
||||||
if (fabs(gyroYawRate) > MIN_YAW_RATE) {
|
if (fabs(gyroYawRate) > MIN_YAW_RATE) {
|
||||||
//if (fabs(myAvatar.getHeadYaw()) > MIN_YAW_ANGLE) {
|
|
||||||
myAvatar.addBodyYaw(-gyroYawRate * YAW_SENSITIVITY * frametime);
|
myAvatar.addBodyYaw(-gyroYawRate * YAW_SENSITIVITY * frametime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue