diff --git a/BUILD.md b/BUILD.md index 9bd5da7c14..c7b343baa1 100644 --- a/BUILD.md +++ b/BUILD.md @@ -7,6 +7,7 @@ * IMPORTANT: OpenSSL 1.0.1g is critical to avoid a security vulnerability. * [Intel Threading Building Blocks](https://www.threadingbuildingblocks.org/) ~> 4.3 * [Bullet Physics Engine](https://code.google.com/p/bullet/downloads/list) ~> 2.82 +* [Gverb](https://github.com/highfidelity/gverb/archive/master.zip) (direct download to latest version) ### OS Specific Build Guides * [BUILD_WIN.md](BUILD_WIN.md) - additional instructions for Windows. @@ -54,11 +55,11 @@ In the examples below the variable $NAME would be replaced by the name of the de ####QXmpp -You can find QXmpp [here](https://github.com/qxmpp-project/qxmpp). The inclusion of the QXmpp enables text chat in the Interface client. +You can [find QXmpp here](https://github.com/qxmpp-project/qxmpp), 0.7.6 is the version you want. The inclusion of the QXmpp enables text chat in the Interface client. OS X users who tap our [homebrew formulas repository](https://github.com/highfidelity/homebrew-formulas) can install QXmpp via homebrew - `brew install highfidelity/formulas/qxmpp`. ####Devices -You can support external input/output devices such as Leap Motion, Faceshift, PrioVR, MIDI, Razr Hydra and more by adding each individual SDK in the visible building path. Refer to the readme file available in each device folder in [interface/external/](interface/external) for the detailed explanation of the requirements to use the device. +You can support external input/output devices such as Oculus Rift, Leap Motion, Faceshift, PrioVR, MIDI, Razr Hydra and more by adding each individual SDK in the visible building path. Refer to the readme file available in each device folder in [interface/external/](interface/external) for the detailed explanation of the requirements to use the device. diff --git a/BUILD_WIN.md b/BUILD_WIN.md index 5045201f62..27f0e02ea7 100644 --- a/BUILD_WIN.md +++ b/BUILD_WIN.md @@ -38,6 +38,8 @@ Once Qt is installed, you need to manually configure the following: ###External Libraries +As it stands, Hifi/Interface is a 32-bit application, so all libraries should also be 32-bit. + CMake will need to know where the headers and libraries for required external dependencies are. The recommended route for CMake to find the external dependencies is to place all of the dependencies in one folder and set one ENV variable - HIFI_LIB_DIR. That ENV variable should point to a directory with the following structure: @@ -75,7 +77,7 @@ As with the Qt libraries, you will need to make sure that directories containing ###OpenSSL -QT will use OpenSSL if it's available, but it doesn't install it, so you must install it separately. +Qt will use OpenSSL if it's available, but it doesn't install it, so you must install it separately. Your system may already have several versions of the OpenSSL DLL's (ssleay32.dll, libeay32.dll) lying around, but they may be the wrong version. If these DLL's are in the PATH then QT will try to use them, and if they're the wrong version then you will see the following errors in the console: @@ -89,7 +91,7 @@ Your system may already have several versions of the OpenSSL DLL's (ssleay32.dll To prevent these problems, install OpenSSL yourself. Download the following binary packages [from this website](http://slproweb.com/products/Win32OpenSSL.html): * Visual C++ 2008 Redistributables -* Win32 OpenSSL v1.0.1h +* Win32 OpenSSL v1.0.1L Install OpenSSL into the Windows system directory, to make sure that Qt uses the version that you've just installed, and not some other version. @@ -133,6 +135,20 @@ This package contains only headers, so there's nothing to add to the PATH. Be careful with glm. For the folder other libraries would normally call 'include', the folder containing the headers, glm opts to use 'glm'. You will have a glm folder nested inside the top-level glm folder. +###Gverb + +1. Go to https://github.com/highfidelity/gverb + Or download the sources directly via this link: + https://github.com/highfidelity/gverb/archive/master.zip + +2. Extract the archive + +3. Place the directories “include” and “src” in interface/external/gverb + (Normally next to this readme) + +4. Clear your build directory, run cmake, build and you should be all set. + + ###Bullet Bullet 2.82 source can be [downloaded here](https://code.google.com/p/bullet/downloads/detail?name=bullet-2.82-r2704.zip). Bullet does not come with prebuilt libraries, you need to make those yourself. diff --git a/assignment-client/src/Agent.cpp b/assignment-client/src/Agent.cpp index 8e700839c1..eab67818c4 100644 --- a/assignment-client/src/Agent.cpp +++ b/assignment-client/src/Agent.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -170,6 +171,11 @@ void Agent::run() { QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance(); QNetworkReply *reply = networkAccessManager.get(QNetworkRequest(scriptURL)); + QNetworkDiskCache* cache = new QNetworkDiskCache(); + QString cachePath = QStandardPaths::writableLocation(QStandardPaths::DataLocation); + cache->setCacheDirectory(!cachePath.isEmpty() ? cachePath : "agentCache"); + networkAccessManager.setCache(cache); + qDebug() << "Downloading script at" << scriptURL.toString(); QEventLoop loop; diff --git a/examples/selectAudioDevice.js b/examples/selectAudioDevice.js index a90f3da4cf..440580b883 100644 --- a/examples/selectAudioDevice.js +++ b/examples/selectAudioDevice.js @@ -98,8 +98,16 @@ function setupAudioMenus() { } } +function onDevicechanged() { + Menu.removeMenu("Tools > Audio"); + setupAudioMenus(); +} + // Have a small delay before the menu's get setup and the audio devices can switch to the last selected ones -Script.setTimeout(function() { setupAudioMenus(); }, 5000); +Script.setTimeout(function () { + AudioDevice.deviceChanged.connect(onDevicechanged); + setupAudioMenus(); +}, 5000); function scriptEnding() { Menu.removeMenu("Tools > Audio"); diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index cda56b3fe4..36d6ded886 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -135,6 +136,9 @@ static unsigned STARFIELD_SEED = 1; static const int BANDWIDTH_METER_CLICK_MAX_DRAG_LENGTH = 6; // farther dragged clicks are ignored + +const qint64 MAXIMUM_CACHE_SIZE = 10737418240; // 10GB + static QTimer* idleTimer = NULL; const QString CHECK_VERSION_URL = "https://highfidelity.io/latestVersion.xml"; @@ -383,7 +387,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : connect(billboardPacketTimer, &QTimer::timeout, _myAvatar, &MyAvatar::sendBillboardPacket); billboardPacketTimer->start(AVATAR_BILLBOARD_PACKET_SEND_INTERVAL_MSECS); + QString cachePath = QStandardPaths::writableLocation(QStandardPaths::DataLocation); QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance(); + QNetworkDiskCache* cache = new QNetworkDiskCache(); + cache->setMaximumCacheSize(MAXIMUM_CACHE_SIZE); + cache->setCacheDirectory(!cachePath.isEmpty() ? cachePath : "interfaceCache"); + networkAccessManager.setCache(cache); ResourceCache::setRequestLimit(3); diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 91d5262bae..97ff2f5dd1 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -106,6 +106,15 @@ Audio::Audio() : // Initialize GVerb initGverb(); + + const qint64 DEVICE_CHECK_INTERVAL_MSECS = 2 * 1000; + + _inputDevices = getDeviceNames(QAudio::AudioInput); + _outputDevices = getDeviceNames(QAudio::AudioOutput); + + QTimer* updateTimer = new QTimer(this); + connect(updateTimer, &QTimer::timeout, this, &Audio::checkDevices); + updateTimer->start(DEVICE_CHECK_INTERVAL_MSECS); } void Audio::reset() { @@ -1116,6 +1125,18 @@ qint64 Audio::AudioOutputIODevice::readData(char * data, qint64 maxSize) { return bytesWritten; } +void Audio::checkDevices() { + QVector inputDevices = getDeviceNames(QAudio::AudioInput); + QVector outputDevices = getDeviceNames(QAudio::AudioOutput); + + if (inputDevices != _inputDevices || outputDevices != _outputDevices) { + _inputDevices = inputDevices; + _outputDevices = outputDevices; + + emit deviceChanged(); + } +} + void Audio::loadSettings() { _receivedAudioStream.loadSettings(); diff --git a/interface/src/Audio.h b/interface/src/Audio.h index 94e92248db..d815b3035c 100644 --- a/interface/src/Audio.h +++ b/interface/src/Audio.h @@ -178,6 +178,7 @@ public slots: signals: bool muteToggled(); void inputReceived(const QByteArray& inputSamples); + void deviceChanged(); protected: Audio(); @@ -276,6 +277,10 @@ private: AudioIOStats _stats; AudioNoiseGate _inputGate; + + QVector _inputDevices; + QVector _outputDevices; + void checkDevices(); }; diff --git a/interface/src/scripting/AudioDeviceScriptingInterface.cpp b/interface/src/scripting/AudioDeviceScriptingInterface.cpp index d5618dc771..fe904cc845 100644 --- a/interface/src/scripting/AudioDeviceScriptingInterface.cpp +++ b/interface/src/scripting/AudioDeviceScriptingInterface.cpp @@ -21,6 +21,8 @@ AudioDeviceScriptingInterface* AudioDeviceScriptingInterface::getInstance() { AudioDeviceScriptingInterface::AudioDeviceScriptingInterface() { connect(DependencyManager::get