From 277aa9dd89a56719b846cbe8066926c357751732 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 4 Dec 2013 14:21:00 -0800 Subject: [PATCH] handle conflicts on merge with upstream master --- interface/src/Application.cpp | 2 +- interface/src/Audio.cpp | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 87df9e3600..c09a1f704c 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -248,7 +248,7 @@ Application::~Application() { _sharedVoxelSystem.changeTree(new VoxelTree); - VoxelNode::removeDeleteHook(&_voxels); // we don't need to do this processing on shutdown + VoxelTreeElement::removeDeleteHook(&_voxels); // we don't need to do this processing on shutdown delete Menu::getInstance(); delete _settings; diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 1c09d9224a..84c00b956c 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -288,6 +288,29 @@ void Audio::handleAudioInput() { } } } + + eventuallySendRecvPing(inputLeft, outputLeft, outputRight); + + + // add output (@speakers) data just written to the scope + _scope->addSamples(1, outputLeft, BUFFER_LENGTH_SAMPLES_PER_CHANNEL); + _scope->addSamples(2, outputRight, BUFFER_LENGTH_SAMPLES_PER_CHANNEL); + + gettimeofday(&_lastCallbackTime, NULL); +} + +// inputBuffer A pointer to an internal portaudio data buffer containing data read by portaudio. +// outputBuffer A pointer to an internal portaudio data buffer to be read by the configured output device. +// frames Number of frames that portaudio requests to be read/written. +// timeInfo Portaudio time info. Currently unused. +// statusFlags Portaudio status flags. Currently unused. +// userData Pointer to supplied user data (in this case, a pointer to the parent Audio object +int Audio::audioCallback (const void* inputBuffer, + void* outputBuffer, + unsigned long frames, + const PaStreamCallbackTimeInfo *timeInfo, + PaStreamCallbackFlags statusFlags, + void* userData) { // copy the audio data to the output device _outputDevice->write((char*) stereoOutputBuffer, sizeof(stereoOutputBuffer));