This commit is contained in:
Stephen Birarda 2013-05-29 11:42:10 -07:00
parent 5d74a865e8
commit a5a30efec9
4 changed files with 10 additions and 6 deletions

View file

@ -217,6 +217,10 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
// initialization continues in initializeGL when OpenGL context is ready
}
bool Application::shouldEchoAudio() {
return _echoAudioMode->isChecked();
}
void Application::initializeGL() {
printLog( "Created Display Window.\n" );

View file

@ -61,10 +61,11 @@ public:
void wheelEvent(QWheelEvent* event);
bool shouldEchoAudio();
Avatar* getAvatar() { return &_myAvatar; }
VoxelSystem* getVoxels() { return &_voxels; }
Environment* getEnvironment() { return &_environment; }
QAction* getEchoAudioMode() { return _echoAudioMode; }
private slots:

View file

@ -19,7 +19,6 @@
#include <PacketHeaders.h>
#include <AgentList.h>
#include <AgentTypes.h>
#include <QAction>
#include "Application.h"
#include "Audio.h"
@ -159,10 +158,10 @@ int audioCallback (const void* inputBuffer,
correctedYaw += 360;
}
if (Application::getInstance()->getEchoAudioMode()->isChecked()) {
if (Application::getInstance()->shouldEchoAudio()) {
correctedYaw = correctedYaw > 0
? correctedYaw + AGENT_LOOPBACK_MODIFIER
: correctedYaw - AGENT_LOOPBACK_MODIFIER;
? correctedYaw + AGENT_LOOPBACK_MODIFIER
: correctedYaw - AGENT_LOOPBACK_MODIFIER;
}
memcpy(currentPacketPtr, &correctedYaw, sizeof(float));

View file

@ -40,8 +40,8 @@ vector<unsigned char> irisTexture;
Head::Head(Avatar* owningAvatar) :
HeadData((AvatarData*)owningAvatar),
_renderAlpha(0.0),
yawRate(0.0f),
_renderAlpha(0.0),
_returnHeadToCenter(false),
_skinColor(0.0f, 0.0f, 0.0f),
_position(0.0f, 0.0f, 0.0f),