History

merge upstream/master into andrew/inertia

Andrew Meadows committed 12 years ago

Commit db717b92 parents 83dc871 f73da0718 files · +2074 −31Browse files

Showing the changes to interface/src/Application.cpp (1 of 18 files). Show all

Unified · Split

interface/src/Application.cpp+13−0
@@ -1674,6 +1674,15 @@ void Application::init() { · 1673 unmodified lines
16741674 connect(_rearMirrorTools, SIGNAL(restoreView()), SLOT(restoreMirrorView()));
16751675 connect(_rearMirrorTools, SIGNAL(shrinkView()), SLOT(shrinkMirrorView()));
16761676 connect(_rearMirrorTools, SIGNAL(resetView()), SLOT(resetSensors()));
1677+
1678+ // set up our audio reflector
1679+ _audioReflector.setMyAvatar(getAvatar());
1680+ _audioReflector.setVoxels(_voxels.getTree());
1681+ _audioReflector.setAudio(getAudio());
1682+ connect(getAudio(), &Audio::processInboundAudio, &_audioReflector, &AudioReflector::processInboundAudio,Qt::DirectConnection);
1683+ connect(getAudio(), &Audio::processLocalAudio, &_audioReflector, &AudioReflector::processLocalAudio,Qt::DirectConnection);
1684+
1685+ // save settings when avatar changes
16771686 connect(_myAvatar, &MyAvatar::transformChanged, this, &Application::bumpSettings);
16781687 }
16791688
@@ -2446,6 +2455,9 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 766 unmodified lines
24462455
24472456 // disable specular lighting for ground and voxels
24482457 glMaterialfv(GL_FRONT, GL_SPECULAR, NO_SPECULAR_COLOR);
2458+
2459+ // draw the audio reflector overlay
2460+ _audioReflector.render();
24492461
24502462 // Draw voxels
24512463 if (Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) {
@@ -3385,6 +3397,7 @@ void Application::loadScript(const QString& scriptName) { · 933 unmodified lines
33853397 scriptEngine->registerGlobalObject("Menu", MenuScriptingInterface::getInstance());
33863398 scriptEngine->registerGlobalObject("Settings", SettingsScriptingInterface::getInstance());
33873399 scriptEngine->registerGlobalObject("AudioDevice", AudioDeviceScriptingInterface::getInstance());
3400+ scriptEngine->registerGlobalObject("AudioReflector", &_audioReflector);
33883401
33893402 QThread* workerThread = new QThread(this);
33903403

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t