From b817143e2ecb3b4c8c345a90e137bf7ebfe03c67 Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Wed, 29 Nov 2017 18:16:21 -0700 Subject: [PATCH 01/11] Fixes on web and QML audio sync --- .../resources/html/createGlobalEventBridge.js | 17 +++++++++++------ libraries/ui/src/ui/OffscreenQmlSurface.cpp | 7 +++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/interface/resources/html/createGlobalEventBridge.js b/interface/resources/html/createGlobalEventBridge.js index bccbdfaf7c..3355ca87c8 100644 --- a/interface/resources/html/createGlobalEventBridge.js +++ b/interface/resources/html/createGlobalEventBridge.js @@ -65,21 +65,26 @@ var EventBridge; // we need to listen to events that might precede the addition of this elements. // A more robust hack will be to add a setInterval that look for DOM changes every 100-300 ms (low performance?) - window.onload = function(){ + window.addEventListener("load",function(event) { setTimeout(function() { EventBridge.forceHtmlAudioOutputDeviceUpdate(); + console.log(":: Window Loaded"); }, 1200); - }; - document.onclick = function(){ + }, false); + + document.addEventListener("click",function(){ setTimeout(function() { EventBridge.forceHtmlAudioOutputDeviceUpdate(); + console.log(":: Window Clicked"); }, 1200); - }; - document.onchange = function(){ + }, false); + + document.addEventListener("change",function(){ setTimeout(function() { EventBridge.forceHtmlAudioOutputDeviceUpdate(); + console.log(":: Window Changes"); }, 1200); - }; + }, false); tempEventBridge._callbacks.forEach(function (callback) { EventBridge.scriptEventReceived.connect(callback); diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.cpp b/libraries/ui/src/ui/OffscreenQmlSurface.cpp index 7bc88d73f6..a585b80090 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.cpp +++ b/libraries/ui/src/ui/OffscreenQmlSurface.cpp @@ -139,7 +139,6 @@ public: QThread::msleep(_runDelayMs); } auto audioIO = DependencyManager::get(); - QString deviceName = audioIO->getActiveAudioDevice(QAudio::AudioOutput).deviceName(); for (auto player : _container->findChildren()) { auto mediaState = player->state(); QMediaService *svc = player->service(); @@ -156,7 +155,7 @@ public: for (int i = 0; i < outputs.size(); i++) { QString output = outputs[i]; QString description = out->outputDescription(output); - if (description == deviceName) { + if (description == _newTargetDevice) { deviceOuput = output; break; } @@ -171,7 +170,7 @@ public: player->stop(); } } - qDebug() << "QML Audio changed to " << deviceName; + qDebug() << "QML Audio changed to " << _newTargetDevice; } private: @@ -700,7 +699,7 @@ void OffscreenQmlSurface::forceQmlAudioOutputDeviceUpdate() { } else { auto audioIO = DependencyManager::get(); QString deviceName = audioIO->getActiveAudioDevice(QAudio::AudioOutput).deviceName(); - int waitForAudioQmlMs = 500; + int waitForAudioQmlMs = 200; // The audio device need to be change using oth new AudioHandler(_rootItem, deviceName, waitForAudioQmlMs); } From b890a29b3a8cf87f8f67b2d1b057be59d12be10c Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Wed, 29 Nov 2017 19:05:01 -0700 Subject: [PATCH 02/11] Clean console log --- interface/resources/html/createGlobalEventBridge.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/interface/resources/html/createGlobalEventBridge.js b/interface/resources/html/createGlobalEventBridge.js index 3355ca87c8..b85aa33e33 100644 --- a/interface/resources/html/createGlobalEventBridge.js +++ b/interface/resources/html/createGlobalEventBridge.js @@ -68,21 +68,18 @@ var EventBridge; window.addEventListener("load",function(event) { setTimeout(function() { EventBridge.forceHtmlAudioOutputDeviceUpdate(); - console.log(":: Window Loaded"); }, 1200); }, false); document.addEventListener("click",function(){ setTimeout(function() { EventBridge.forceHtmlAudioOutputDeviceUpdate(); - console.log(":: Window Clicked"); }, 1200); }, false); document.addEventListener("change",function(){ setTimeout(function() { EventBridge.forceHtmlAudioOutputDeviceUpdate(); - console.log(":: Window Changes"); }, 1200); }, false); From e02e81039976ba32feb7c266e4331f9bb7eaab29 Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Thu, 30 Nov 2017 15:06:02 -0700 Subject: [PATCH 03/11] Audio Handler fix --- libraries/ui/src/ui/OffscreenQmlSurface.cpp | 69 +++++++++++---------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.cpp b/libraries/ui/src/ui/OffscreenQmlSurface.cpp index a585b80090..7c100ebb1b 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.cpp +++ b/libraries/ui/src/ui/OffscreenQmlSurface.cpp @@ -121,10 +121,10 @@ uint64_t uvec2ToUint64(const uvec2& v) { class AudioHandler : public QObject, QRunnable { Q_OBJECT public: - AudioHandler(QObject* container, const QString& deviceName, int runDelayMs = 0, QObject* parent = nullptr) : QObject(parent) { - _container = container; + AudioHandler(OffscreenQmlSurface* surface, const QString& deviceName, int runDelayMs = 0, QObject* parent = nullptr) : QObject(parent) { _newTargetDevice = deviceName; _runDelayMs = runDelayMs; + _surface = surface; setAutoDelete(true); QThreadPool::globalInstance()->start(this); } @@ -139,35 +139,40 @@ public: QThread::msleep(_runDelayMs); } auto audioIO = DependencyManager::get(); - for (auto player : _container->findChildren()) { - auto mediaState = player->state(); - QMediaService *svc = player->service(); - if (nullptr == svc) { - return; - } - QAudioOutputSelectorControl *out = qobject_cast - (svc->requestControl(QAudioOutputSelectorControl_iid)); - if (nullptr == out) { - return; - } - QString deviceOuput; - auto outputs = out->availableOutputs(); - for (int i = 0; i < outputs.size(); i++) { - QString output = outputs[i]; - QString description = out->outputDescription(output); - if (description == _newTargetDevice) { - deviceOuput = output; - break; + + auto rootItem = _surface->getRootItem(); + if (rootItem) { + for (auto player : rootItem->findChildren()) { + auto mediaState = player->state(); + QMediaService *svc = player->service(); + if (nullptr == svc) { + return; + } + QAudioOutputSelectorControl *out = qobject_cast + (svc->requestControl(QAudioOutputSelectorControl_iid)); + if (nullptr == out) { + return; + } + QString deviceOuput; + auto outputs = out->availableOutputs(); + for (int i = 0; i < outputs.size(); i++) { + QString output = outputs[i]; + QString description = out->outputDescription(output); + if (description == _newTargetDevice) { + deviceOuput = output; + break; + } + } + out->setActiveOutput(deviceOuput); + svc->releaseControl(out); + // if multimedia was paused, it will start playing automatically after changing audio device + // this will reset it back to a paused state + if (mediaState == QMediaPlayer::State::PausedState) { + player->pause(); + } + else if (mediaState == QMediaPlayer::State::StoppedState) { + player->stop(); } - } - out->setActiveOutput(deviceOuput); - svc->releaseControl(out); - // if multimedia was paused, it will start playing automatically after changing audio device - // this will reset it back to a paused state - if (mediaState == QMediaPlayer::State::PausedState) { - player->pause(); - } else if (mediaState == QMediaPlayer::State::StoppedState) { - player->stop(); } } qDebug() << "QML Audio changed to " << _newTargetDevice; @@ -175,7 +180,7 @@ public: private: QString _newTargetDevice; - QObject* _container; + OffscreenQmlSurface* _surface; int _runDelayMs; }; @@ -701,7 +706,7 @@ void OffscreenQmlSurface::forceQmlAudioOutputDeviceUpdate() { QString deviceName = audioIO->getActiveAudioDevice(QAudio::AudioOutput).deviceName(); int waitForAudioQmlMs = 200; // The audio device need to be change using oth - new AudioHandler(_rootItem, deviceName, waitForAudioQmlMs); + new AudioHandler(this, deviceName, waitForAudioQmlMs); } } From 58e829dbda1d64100913352a145f9293418868f2 Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Thu, 30 Nov 2017 15:11:38 -0700 Subject: [PATCH 04/11] Delete leftover line --- libraries/ui/src/ui/OffscreenQmlSurface.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.cpp b/libraries/ui/src/ui/OffscreenQmlSurface.cpp index 7c100ebb1b..019897e5c3 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.cpp +++ b/libraries/ui/src/ui/OffscreenQmlSurface.cpp @@ -138,8 +138,6 @@ public: if (_runDelayMs > 0) { QThread::msleep(_runDelayMs); } - auto audioIO = DependencyManager::get(); - auto rootItem = _surface->getRootItem(); if (rootItem) { for (auto player : rootItem->findChildren()) { From 0729579266b167c2d832362fca0234118809c9a1 Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Thu, 30 Nov 2017 15:21:43 -0700 Subject: [PATCH 05/11] fix for loop --- libraries/ui/src/ui/OffscreenQmlSurface.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.cpp b/libraries/ui/src/ui/OffscreenQmlSurface.cpp index 019897e5c3..2f5d0197bb 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.cpp +++ b/libraries/ui/src/ui/OffscreenQmlSurface.cpp @@ -140,7 +140,9 @@ public: } auto rootItem = _surface->getRootItem(); if (rootItem) { - for (auto player : rootItem->findChildren()) { + auto children = rootItem->findChildren(); + for (int i = 0; i < children.size(); i++) { + auto player = children[i]; auto mediaState = player->state(); QMediaService *svc = player->service(); if (nullptr == svc) { @@ -702,7 +704,7 @@ void OffscreenQmlSurface::forceQmlAudioOutputDeviceUpdate() { } else { auto audioIO = DependencyManager::get(); QString deviceName = audioIO->getActiveAudioDevice(QAudio::AudioOutput).deviceName(); - int waitForAudioQmlMs = 200; + int waitForAudioQmlMs = 500; // The audio device need to be change using oth new AudioHandler(this, deviceName, waitForAudioQmlMs); } From 9cd2dc921aa013b493db7f0a7216e4ff1b59dfaa Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Thu, 30 Nov 2017 15:31:29 -0700 Subject: [PATCH 06/11] back to for loop --- libraries/ui/src/ui/OffscreenQmlSurface.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.cpp b/libraries/ui/src/ui/OffscreenQmlSurface.cpp index 2f5d0197bb..019897e5c3 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.cpp +++ b/libraries/ui/src/ui/OffscreenQmlSurface.cpp @@ -140,9 +140,7 @@ public: } auto rootItem = _surface->getRootItem(); if (rootItem) { - auto children = rootItem->findChildren(); - for (int i = 0; i < children.size(); i++) { - auto player = children[i]; + for (auto player : rootItem->findChildren()) { auto mediaState = player->state(); QMediaService *svc = player->service(); if (nullptr == svc) { @@ -704,7 +702,7 @@ void OffscreenQmlSurface::forceQmlAudioOutputDeviceUpdate() { } else { auto audioIO = DependencyManager::get(); QString deviceName = audioIO->getActiveAudioDevice(QAudio::AudioOutput).deviceName(); - int waitForAudioQmlMs = 500; + int waitForAudioQmlMs = 200; // The audio device need to be change using oth new AudioHandler(this, deviceName, waitForAudioQmlMs); } From 98e836169005e7f143092c171c59bf3ecc044d39 Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Thu, 30 Nov 2017 16:07:43 -0700 Subject: [PATCH 07/11] Fix and rebuild --- libraries/ui/src/ui/OffscreenQmlSurface.cpp | 10 +++------- libraries/ui/src/ui/OffscreenQmlSurface.h | 2 ++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.cpp b/libraries/ui/src/ui/OffscreenQmlSurface.cpp index 019897e5c3..c9fe738940 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.cpp +++ b/libraries/ui/src/ui/OffscreenQmlSurface.cpp @@ -139,7 +139,7 @@ public: QThread::msleep(_runDelayMs); } auto rootItem = _surface->getRootItem(); - if (rootItem) { + if (rootItem && !_surface->getCleaned()) { for (auto player : rootItem->findChildren()) { auto mediaState = player->state(); QMediaService *svc = player->service(); @@ -165,12 +165,7 @@ public: svc->releaseControl(out); // if multimedia was paused, it will start playing automatically after changing audio device // this will reset it back to a paused state - if (mediaState == QMediaPlayer::State::PausedState) { - player->pause(); - } - else if (mediaState == QMediaPlayer::State::StoppedState) { - player->stop(); - } + } } qDebug() << "QML Audio changed to " << _newTargetDevice; @@ -504,6 +499,7 @@ QOpenGLContext* OffscreenQmlSurface::getSharedContext() { } void OffscreenQmlSurface::cleanup() { + _isCleaned = true; _canvas->makeCurrent(); _renderControl->invalidate(); diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.h b/libraries/ui/src/ui/OffscreenQmlSurface.h index 44c6c3c77b..371b110aa9 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.h +++ b/libraries/ui/src/ui/OffscreenQmlSurface.h @@ -75,6 +75,7 @@ public: void pause(); void resume(); bool isPaused() const; + bool getCleaned() { return _isCleaned; } void setBaseUrl(const QUrl& baseUrl); QQuickItem* getRootItem(); @@ -177,6 +178,7 @@ private: bool _polish { true }; bool _paused { true }; bool _focusText { false }; + bool _isCleaned{ false }; uint8_t _maxFps { 60 }; MouseTranslator _mouseTranslator { [](const QPointF& p) { return p.toPoint(); } }; QWindow* _proxyWindow { nullptr }; From 5d1f2a04c1f8101df9d3ed48fd5efb4a7564d42b Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Thu, 30 Nov 2017 16:43:38 -0700 Subject: [PATCH 08/11] restate deleted lines --- libraries/ui/src/ui/OffscreenQmlSurface.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.cpp b/libraries/ui/src/ui/OffscreenQmlSurface.cpp index c9fe738940..98a307e497 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.cpp +++ b/libraries/ui/src/ui/OffscreenQmlSurface.cpp @@ -165,7 +165,12 @@ public: svc->releaseControl(out); // if multimedia was paused, it will start playing automatically after changing audio device // this will reset it back to a paused state - + if (mediaState == QMediaPlayer::State::PausedState) { + player->pause(); + } + else if (mediaState == QMediaPlayer::State::StoppedState) { + player->stop(); + } } } qDebug() << "QML Audio changed to " << _newTargetDevice; From 83e370d9ded2657f7e1613cb8b7f9a6be8bd7bad Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Thu, 30 Nov 2017 17:40:49 -0700 Subject: [PATCH 09/11] add shared pointer --- libraries/ui/src/ui/OffscreenQmlSurface.cpp | 11 +++++------ libraries/ui/src/ui/OffscreenQmlSurface.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.cpp b/libraries/ui/src/ui/OffscreenQmlSurface.cpp index 98a307e497..5bcf06ce82 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.cpp +++ b/libraries/ui/src/ui/OffscreenQmlSurface.cpp @@ -121,7 +121,7 @@ uint64_t uvec2ToUint64(const uvec2& v) { class AudioHandler : public QObject, QRunnable { Q_OBJECT public: - AudioHandler(OffscreenQmlSurface* surface, const QString& deviceName, int runDelayMs = 0, QObject* parent = nullptr) : QObject(parent) { + AudioHandler(QSharedPointer surface, const QString& deviceName, int runDelayMs = 0, QObject* parent = nullptr) : QObject(parent) { _newTargetDevice = deviceName; _runDelayMs = runDelayMs; _surface = surface; @@ -138,9 +138,8 @@ public: if (_runDelayMs > 0) { QThread::msleep(_runDelayMs); } - auto rootItem = _surface->getRootItem(); - if (rootItem && !_surface->getCleaned()) { - for (auto player : rootItem->findChildren()) { + if (!_surface.isNull() && _surface->getRootItem() && !_surface->getCleaned()) { + for (auto player : _surface->getRootItem()->findChildren()) { auto mediaState = player->state(); QMediaService *svc = player->service(); if (nullptr == svc) { @@ -178,7 +177,7 @@ public: private: QString _newTargetDevice; - OffscreenQmlSurface* _surface; + QSharedPointer _surface; int _runDelayMs; }; @@ -705,7 +704,7 @@ void OffscreenQmlSurface::forceQmlAudioOutputDeviceUpdate() { QString deviceName = audioIO->getActiveAudioDevice(QAudio::AudioOutput).deviceName(); int waitForAudioQmlMs = 200; // The audio device need to be change using oth - new AudioHandler(this, deviceName, waitForAudioQmlMs); + new AudioHandler(sharedFromThis(), deviceName, waitForAudioQmlMs); } } diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.h b/libraries/ui/src/ui/OffscreenQmlSurface.h index 371b110aa9..34da11c66c 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.h +++ b/libraries/ui/src/ui/OffscreenQmlSurface.h @@ -40,7 +40,7 @@ class QQuickItem; using QmlContextCallback = std::function; -class OffscreenQmlSurface : public QObject { +class OffscreenQmlSurface : public QObject, public QEnableSharedFromThis { Q_OBJECT Q_PROPERTY(bool focusText READ isFocusText NOTIFY focusTextChanged) public: From d271f619870163045927ea4d7b8298a9fddd96ed Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Fri, 1 Dec 2017 14:37:59 -0700 Subject: [PATCH 10/11] Proper fix --- libraries/ui/src/ui/OffscreenQmlSurface.cpp | 40 ++++++++++++++------- libraries/ui/src/ui/OffscreenQmlSurface.h | 5 +++ 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.cpp b/libraries/ui/src/ui/OffscreenQmlSurface.cpp index 5bcf06ce82..b3ebf30a94 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.cpp +++ b/libraries/ui/src/ui/OffscreenQmlSurface.cpp @@ -121,23 +121,18 @@ uint64_t uvec2ToUint64(const uvec2& v) { class AudioHandler : public QObject, QRunnable { Q_OBJECT public: - AudioHandler(QSharedPointer surface, const QString& deviceName, int runDelayMs = 0, QObject* parent = nullptr) : QObject(parent) { + AudioHandler(QSharedPointer surface, const QString& deviceName, QObject* parent = nullptr) : QObject(parent) { _newTargetDevice = deviceName; - _runDelayMs = runDelayMs; _surface = surface; setAutoDelete(true); - QThreadPool::globalInstance()->start(this); + if (deviceName.size() > 0) { + QThreadPool::globalInstance()->start(this); + } } virtual ~AudioHandler() { qDebug() << "Audio Handler Destroyed"; } void run() override { - if (_newTargetDevice.isEmpty()) { - return; - } - if (_runDelayMs > 0) { - QThread::msleep(_runDelayMs); - } if (!_surface.isNull() && _surface->getRootItem() && !_surface->getCleaned()) { for (auto player : _surface->getRootItem()->findChildren()) { auto mediaState = player->state(); @@ -602,6 +597,7 @@ OffscreenQmlSurface::OffscreenQmlSurface() { OffscreenQmlSurface::~OffscreenQmlSurface() { QObject::disconnect(&_updateTimer); + disconnectAudioOutputTimer(); QObject::disconnect(qApp); cleanup(); @@ -615,6 +611,15 @@ OffscreenQmlSurface::~OffscreenQmlSurface() { void OffscreenQmlSurface::onAboutToQuit() { _paused = true; QObject::disconnect(&_updateTimer); + disconnectAudioOutputTimer(); + +} + +void OffscreenQmlSurface::disconnectAudioOutputTimer() { + if (_audioOutputUpdateTimer.isActive()) { + _audioOutputUpdateTimer.stop(); + } + QObject::disconnect(&_audioOutputUpdateTimer); } void OffscreenQmlSurface::create() { @@ -673,6 +678,14 @@ void OffscreenQmlSurface::create() { } }); + // Setup the update of the QML media components with the current audio output device + QObject::connect(&_audioOutputUpdateTimer, &QTimer::timeout, this, [this]() { + new AudioHandler(sharedFromThis(), _currentAudioOutputDevice); + }); + int waitForAudioQmlMs = 200; + _audioOutputUpdateTimer.setInterval(waitForAudioQmlMs); + _audioOutputUpdateTimer.setSingleShot(true); + // When Quick says there is a need to render, we will not render immediately. Instead, // a timer with a small interval is used to get better performance. QObject::connect(&_updateTimer, &QTimer::timeout, this, &OffscreenQmlSurface::updateQuick); @@ -701,10 +714,11 @@ void OffscreenQmlSurface::forceQmlAudioOutputDeviceUpdate() { QMetaObject::invokeMethod(this, "forceQmlAudioOutputDeviceUpdate", Qt::QueuedConnection); } else { auto audioIO = DependencyManager::get(); - QString deviceName = audioIO->getActiveAudioDevice(QAudio::AudioOutput).deviceName(); - int waitForAudioQmlMs = 200; - // The audio device need to be change using oth - new AudioHandler(sharedFromThis(), deviceName, waitForAudioQmlMs); + _currentAudioOutputDevice = audioIO->getActiveAudioDevice(QAudio::AudioOutput).deviceName(); + if (_audioOutputUpdateTimer.isActive()) { + _audioOutputUpdateTimer.stop(); + } + _audioOutputUpdateTimer.start(); } } diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.h b/libraries/ui/src/ui/OffscreenQmlSurface.h index 34da11c66c..4c23c62c12 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.h +++ b/libraries/ui/src/ui/OffscreenQmlSurface.h @@ -117,6 +117,7 @@ public slots: void changeAudioOutputDevice(const QString& deviceName, bool isHtmlUpdate = false); void forceHtmlAudioOutputDeviceUpdate(); void forceQmlAudioOutputDeviceUpdate(); + signals: void audioOutputDeviceChanged(const QString& deviceName); @@ -148,6 +149,7 @@ private: void render(); void cleanup(); QJsonObject getGLContextData(); + void disconnectAudioOutputTimer(); private slots: void updateQuick(); @@ -171,6 +173,9 @@ private: uint64_t _lastRenderTime { 0 }; uvec2 _size; + QTimer _audioOutputUpdateTimer; + QString _currentAudioOutputDevice; + // Texture management TextureAndFence _latestTextureAndFence { 0, 0 }; From fefedc11c80fde2fd181088a61bd41c0976029c6 Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Fri, 1 Dec 2017 15:17:23 -0700 Subject: [PATCH 11/11] mac fix --- libraries/ui/src/ui/OffscreenQmlSurface.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/ui/src/ui/OffscreenQmlSurface.cpp b/libraries/ui/src/ui/OffscreenQmlSurface.cpp index b3ebf30a94..9a591018f5 100644 --- a/libraries/ui/src/ui/OffscreenQmlSurface.cpp +++ b/libraries/ui/src/ui/OffscreenQmlSurface.cpp @@ -173,7 +173,6 @@ public: private: QString _newTargetDevice; QSharedPointer _surface; - int _runDelayMs; }; class OffscreenTextures {