From 3301ad64f4a6cb7fb67c8371bb53030f677669a0 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Thu, 11 Dec 2014 12:32:31 -0800 Subject: [PATCH 01/15] Split initGverb into create/configure --- interface/src/Audio.cpp | 31 ++++++++++++------------------- interface/src/Audio.h | 3 ++- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 101d16d3ba..7514e062ce 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -495,31 +495,24 @@ bool Audio::switchOutputToAudioDevice(const QString& outputDeviceName) { return switchOutputToAudioDevice(getNamedAudioDeviceForMode(QAudio::AudioOutput, outputDeviceName)); } -void Audio::initGverb() { +ty_gverb* Audio::createGverbFilter() { // Initialize a new gverb instance - _gverbLocal = gverb_new(_outputFormat.sampleRate(), _reverbOptions->getMaxRoomSize(), _reverbOptions->getRoomSize(), - _reverbOptions->getReverbTime(), _reverbOptions->getDamping(), _reverbOptions->getSpread(), - _reverbOptions->getInputBandwidth(), _reverbOptions->getEarlyLevel(), - _reverbOptions->getTailLevel()); - _gverb = gverb_new(_outputFormat.sampleRate(), _reverbOptions->getMaxRoomSize(), _reverbOptions->getRoomSize(), + ty_gverb* filter = gverb_new(_outputFormat.sampleRate(), _reverbOptions->getMaxRoomSize(), _reverbOptions->getRoomSize(), _reverbOptions->getReverbTime(), _reverbOptions->getDamping(), _reverbOptions->getSpread(), _reverbOptions->getInputBandwidth(), _reverbOptions->getEarlyLevel(), _reverbOptions->getTailLevel()); + return filter; +} + +void Audio::configureGverbFilter(ty_gverb* filter) { // Configure the instance (these functions are not super well named - they actually set several internal variables) - gverb_set_roomsize(_gverbLocal, _reverbOptions->getRoomSize()); - gverb_set_revtime(_gverbLocal, _reverbOptions->getReverbTime()); - gverb_set_damping(_gverbLocal, _reverbOptions->getDamping()); - gverb_set_inputbandwidth(_gverbLocal, _reverbOptions->getInputBandwidth()); - gverb_set_earlylevel(_gverbLocal, DB_CO(_reverbOptions->getEarlyLevel())); - gverb_set_taillevel(_gverbLocal, DB_CO(_reverbOptions->getTailLevel())); - - gverb_set_roomsize(_gverb, _reverbOptions->getRoomSize()); - gverb_set_revtime(_gverb, _reverbOptions->getReverbTime()); - gverb_set_damping(_gverb, _reverbOptions->getDamping()); - gverb_set_inputbandwidth(_gverb, _reverbOptions->getInputBandwidth()); - gverb_set_earlylevel(_gverb, DB_CO(_reverbOptions->getEarlyLevel())); - gverb_set_taillevel(_gverb, DB_CO(_reverbOptions->getTailLevel())); + gverb_set_roomsize(filter, _reverbOptions->getRoomSize()); + gverb_set_revtime(filter, _reverbOptions->getReverbTime()); + gverb_set_damping(filter, _reverbOptions->getDamping()); + gverb_set_inputbandwidth(filter, _reverbOptions->getInputBandwidth()); + gverb_set_earlylevel(filter, DB_CO(_reverbOptions->getEarlyLevel())); + gverb_set_taillevel(filter, DB_CO(_reverbOptions->getTailLevel())); } void Audio::updateGverbOptions() { diff --git a/interface/src/Audio.h b/interface/src/Audio.h index 47fe00a84c..22a679370d 100644 --- a/interface/src/Audio.h +++ b/interface/src/Audio.h @@ -256,7 +256,8 @@ private: void processProceduralAudio(int16_t* monoInput, int numSamples); // Adds Reverb - void initGverb(); + ty_gverb* createGverbFilter(); + void configureGverbFilter(ty_gverb* filter); void updateGverbOptions(); void addReverb(ty_gverb* gverb, int16_t* samples, int numSamples, QAudioFormat& format, bool noEcho = false); From 1f35e130efec51565d4fae59d636ce0ac5fade6c Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Thu, 11 Dec 2014 12:33:40 -0800 Subject: [PATCH 02/15] Smooth reverb wet level on room edges --- assignment-client/src/audio/AudioMixer.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/assignment-client/src/audio/AudioMixer.cpp b/assignment-client/src/audio/AudioMixer.cpp index c3ec321c77..92f46c29ec 100644 --- a/assignment-client/src/audio/AudioMixer.cpp +++ b/assignment-client/src/audio/AudioMixer.cpp @@ -475,10 +475,20 @@ void AudioMixer::sendAudioEnvironmentPacket(SharedNodePointer node) { for (int i = 0; i < _zoneReverbSettings.size(); ++i) { AudioMixerClientData* data = static_cast(node->getLinkedData()); glm::vec3 streamPosition = data->getAvatarAudioStream()->getPosition(); - if (_audioZones[_zoneReverbSettings[i].zone].contains(streamPosition)) { + AABox box = _audioZones[_zoneReverbSettings[i].zone]; + if (box.contains(streamPosition)) { hasReverb = true; reverbTime = _zoneReverbSettings[i].reverbTime; wetLevel = _zoneReverbSettings[i].wetLevel; + + // Modulate wet level with distance to wall + float MIN_ATTENUATION_DISTANCE = 2.0f; + float MAX_ATTENUATION = 0.75f; + glm::vec3 distanceToWalls = (box.getDimensions() / 2.0f) - glm::abs(streamPosition - box.calcCenter()); + float distanceToClosestWall = glm::min(distanceToWalls.x, distanceToWalls.z); + if (distanceToClosestWall < MIN_ATTENUATION_DISTANCE) { + wetLevel *= 1.0f - MAX_ATTENUATION * (1.0f - distanceToClosestWall / MIN_ATTENUATION_DISTANCE); + } break; } } From 3fbed61a675afde5f306197c4ba7fb2bb8a56810 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Thu, 11 Dec 2014 12:39:59 -0800 Subject: [PATCH 03/15] Correctly free filters --- interface/src/Audio.cpp | 5 +++++ interface/src/Audio.h | 1 + 2 files changed, 6 insertions(+) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 7514e062ce..9c450b8b64 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -139,6 +139,11 @@ Audio::Audio(QObject* parent) : initGverb(); } +Audio::~Audio() { + gverb_free(_gverb); + gverb_free(_gverbLocal); +} + void Audio::init(QGLWidget *parent) { _micTextureId = parent->bindTexture(QImage(Application::resourcesPath() + "images/mic.svg")); _muteTextureId = parent->bindTexture(QImage(Application::resourcesPath() + "images/mic-mute.svg")); diff --git a/interface/src/Audio.h b/interface/src/Audio.h index 22a679370d..cef49088fa 100644 --- a/interface/src/Audio.h +++ b/interface/src/Audio.h @@ -85,6 +85,7 @@ public: // setup for audio I/O Audio(QObject* parent = 0); + ~Audio(); float getLastInputLoudness() const { return glm::max(_lastInputLoudness - _noiseGateMeasuredFloor, 0.0f); } float getTimeSinceLastClip() const { return _timeSinceLastClip; } From 96262fac36d238480a88d0c0e04ed4814e21abf6 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Thu, 11 Dec 2014 12:41:18 -0800 Subject: [PATCH 04/15] flush filters on reset / do not update on wetLevel change --- interface/src/Audio.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 9c450b8b64..aebd9d1795 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -157,6 +157,9 @@ void Audio::reset() { _toneSource.reset(); _sourceGain.reset(); _inputGain.reset(); + + gverb_flush(_gverb); + gverb_flush(_gverbLocal); } void Audio::resetStats() { @@ -530,7 +533,7 @@ void Audio::updateGverbOptions() { } if (_zoneReverbOptions.getWetLevel() != _receivedAudioStream.getWetLevel()) { _zoneReverbOptions.setWetLevel(_receivedAudioStream.getWetLevel()); - reverbChanged = true; + // Not part of actual filter config, no need to set reverbChanged to true } if (_reverbOptions != &_zoneReverbOptions) { From 58275ac3dde67c498376b027119be4891835870f Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Thu, 11 Dec 2014 13:14:48 -0800 Subject: [PATCH 05/15] Flush gverb filters on turn off --- interface/src/Audio.cpp | 39 +++++++++++++++++++++++++++++++-------- interface/src/Audio.h | 2 +- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index aebd9d1795..aec586290e 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -135,8 +135,9 @@ Audio::Audio(QObject* parent) : connect(&_receivedAudioStream, &MixedProcessedAudioStream::addedStereoSamples, this, &Audio::addStereoSamplesToScope, Qt::DirectConnection); connect(&_receivedAudioStream, &MixedProcessedAudioStream::processSamples, this, &Audio::processReceivedSamples, Qt::DirectConnection); - // Initialize GVerb - initGverb(); + // create GVerb filters + _gverb = createGverbFilter(); + _gverbLocal = createGverbFilter(); } Audio::~Audio() { @@ -148,6 +149,10 @@ void Audio::init(QGLWidget *parent) { _micTextureId = parent->bindTexture(QImage(Application::resourcesPath() + "images/mic.svg")); _muteTextureId = parent->bindTexture(QImage(Application::resourcesPath() + "images/mic-mute.svg")); _boxTextureId = parent->bindTexture(QImage(Application::resourcesPath() + "images/audio-box.svg")); + + // configure filters + configureGverbFilter(_gverb); + configureGverbFilter(_gverbLocal); } void Audio::reset() { @@ -463,12 +468,11 @@ void Audio::start() { _sourceGain.initialize(); _noiseSource.initialize(); _toneSource.initialize(); - _sourceGain.setParameters(0.25f,0.0f); - _inputGain.setParameters(1.0f,0.0f); + _sourceGain.setParameters(0.25f, 0.0f); + _inputGain.setParameters(1.0f, 0.0f); } void Audio::stop() { - _inputFrameBuffer.finalize(); _inputGain.finalize(); _sourceGain.finalize(); @@ -546,7 +550,21 @@ void Audio::updateGverbOptions() { } if (reverbChanged) { - initGverb(); + gverb_free(_gverb); + _gverb = createGverbFilter(); + configureGverbFilter(_gverb); + gverb_free(_gverbLocal); + _gverbLocal = createGverbFilter(); + configureGverbFilter(_gverbLocal); + } +} + +void Audio::setReverb(bool reverb) { + _reverb = reverb; + + if (!_reverb) { + gverb_flush(_gverb); + gverb_flush(_gverbLocal); } } @@ -565,8 +583,13 @@ void Audio::setReverbOptions(const AudioEffectOptions* options) { _scriptReverbOptions.setWetLevel(options->getWetLevel()); if (_reverbOptions == &_scriptReverbOptions) { - // Apply them to the reverb instance(s) - initGverb(); + // Apply them to the reverb instances + gverb_free(_gverb); + _gverb = createGverbFilter(); + configureGverbFilter(_gverb); + gverb_free(_gverbLocal); + _gverbLocal = createGverbFilter(); + configureGverbFilter(_gverbLocal); } } diff --git a/interface/src/Audio.h b/interface/src/Audio.h index cef49088fa..8176e1bdf5 100644 --- a/interface/src/Audio.h +++ b/interface/src/Audio.h @@ -165,7 +165,7 @@ public slots: float getInputVolume() const { return (_audioInput) ? _audioInput->volume() : 0.0f; } void setInputVolume(float volume) { if (_audioInput) _audioInput->setVolume(volume); } - void setReverb(bool reverb) { _reverb = reverb; } + void setReverb(bool reverb); void setReverbOptions(const AudioEffectOptions* options); const AudioStreamStats& getAudioMixerAvatarStreamAudioStats() const { return _audioMixerAvatarStreamAudioStats; } From 59e7c1ecc092c6526320624c58e189b1bb3f9e16 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 29 Dec 2014 15:31:27 -0800 Subject: [PATCH 06/15] Avoid int overflow --- interface/src/ModelUploader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/ModelUploader.cpp b/interface/src/ModelUploader.cpp index e702d9db76..26eac328ae 100644 --- a/interface/src/ModelUploader.cpp +++ b/interface/src/ModelUploader.cpp @@ -55,7 +55,7 @@ static const QString MODEL_URL = "/api/v1/models"; static const QString SETTING_NAME = "LastModelUploadLocation"; -static const int BYTES_PER_MEGABYTES = 1024 * 1024; +static const unsigned long BYTES_PER_MEGABYTES = 1024 * 1024; static const unsigned long MAX_SIZE = 50 * 1024 * BYTES_PER_MEGABYTES; // 50 GB (Virtually remove limit) static const int MAX_TEXTURE_SIZE = 1024; static const int TIMEOUT = 1000; From 7b88deef16e07a83f7dd2c560cb7ed95aeb2b2c5 Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Tue, 13 Jan 2015 22:08:35 +0100 Subject: [PATCH 07/15] Implement UI sounds for virtualKeyboard & notifications --- examples/controllers/oculus/goTo.js | 10 +- .../virtualKeyboardTextEntityExample.js | 10 +- examples/libraries/soundArray.js | 40 ++++++ examples/notifications.js | 135 +++++++++--------- 4 files changed, 128 insertions(+), 67 deletions(-) create mode 100644 examples/libraries/soundArray.js diff --git a/examples/controllers/oculus/goTo.js b/examples/controllers/oculus/goTo.js index ba1ee1eb81..f3db99493d 100644 --- a/examples/controllers/oculus/goTo.js +++ b/examples/controllers/oculus/goTo.js @@ -18,6 +18,7 @@ Script.include("../../libraries/globals.js"); Script.include("../../libraries/virtualKeyboard.js"); +Script.include("../../libraries/soundArray.js"); var windowDimensions = Controller.getViewportDimensions(); var cursor = null; @@ -26,6 +27,12 @@ var textFontSize = 9; var text = null; var locationURL = ""; +var randomSounds = new SoundArray({}, true); +var numberOfSounds = 7; +for (var i = 1; i <= numberOfSounds; i++) { + randomSounds.addSound(HIFI_PUBLIC_BUCKET + "sounds/UI/virtualKeyboard-press" + i + ".raw"); +} + function appendChar(char) { locationURL += char; updateTextOverlay(); @@ -51,6 +58,7 @@ function updateTextOverlay() { } keyboard.onKeyPress = function(event) { + randomSounds.playRandom(); if (event.event == 'keypress') { appendChar(event.char); } @@ -66,7 +74,7 @@ keyboard.onKeyRelease = function(event) { print("going to hifi://" + locationURL); location = "hifi://" + locationURL; locationURL = ""; - keyboard.hide(); + keyboard.hide(); updateTextOverlay(); } } diff --git a/examples/controllers/oculus/virtualKeyboardTextEntityExample.js b/examples/controllers/oculus/virtualKeyboardTextEntityExample.js index 794b659bcb..3c201cb307 100644 --- a/examples/controllers/oculus/virtualKeyboardTextEntityExample.js +++ b/examples/controllers/oculus/virtualKeyboardTextEntityExample.js @@ -17,6 +17,7 @@ Script.include("../../libraries/globals.js"); Script.include("../../libraries/virtualKeyboard.js"); +Script.include("../../libraries/soundArray.js"); const SPAWN_DISTANCE = 1; const DEFAULT_TEXT_DIMENSION_Z = 0.02; @@ -34,6 +35,12 @@ var text = null; var textText = ""; var textSizeMeasureOverlay = Overlays.addOverlay("text3d", {visible: false}); +var randomSounds = new SoundArray({}, true); +var numberOfSounds = 7; +for (var i = 1; i <= numberOfSounds; i++) { + randomSounds.addSound(HIFI_PUBLIC_BUCKET + "sounds/UI/virtualKeyboard-press" + i + ".raw"); +} + function appendChar(char) { textText += char; updateTextOverlay(); @@ -58,6 +65,7 @@ function updateTextOverlay() { } keyboard.onKeyPress = function(event) { + randomSounds.playRandom(); if (event.event == 'keypress') { appendChar(event.char); } else if (event.event == 'enter') { @@ -100,7 +108,7 @@ keyboard.onKeyRelease = function(event) { backgroundColor: { red: 0, green: 0, blue: 0 }, textColor: { red: 255, green: 255, blue: 255 }, text: textText + "\n" + usernameLine, - lineHeight: 0.1 + lineHeight: 0.1 }); } textText = ""; diff --git a/examples/libraries/soundArray.js b/examples/libraries/soundArray.js new file mode 100644 index 0000000000..0da2db07d3 --- /dev/null +++ b/examples/libraries/soundArray.js @@ -0,0 +1,40 @@ +/** + * An array for sounds, allows you to randomly play a sound + * taken from the removed editVoxels.js + */ +SoundArray = function(audioOptions, autoUpdateAudioPosition) { + this.audioOptions = audioOptions !== undefined ? audioOptions : {}; + this.autoUpdateAudioPosition = autoUpdateAudioPosition !== undefined ? autoUpdateAudioPosition : false; + if (this.audioOptions.position === undefined) { + this.audioOptions.position = Vec3.sum(MyAvatar.position, { x: 0, y: 1, z: 0}), + } + if (this.audioOptions.volume === undefined) { + this.audioOptions.volume = 1.0; + } + this.sounds = new Array(); + this.addSound = function (soundURL) { + this.sounds[this.sounds.length] = SoundCache.getSound(soundURL); + }; + this.play = function (index) { + if (0 <= index && index < this.sounds.length) { + if (this.autoUpdateAudioPosition) { + this.updateAudioPosition(); + } + Audio.playSound(this.sounds[index], this.audioOptions); + } else { + print("[ERROR] libraries/soundArray.js:play() : Index " + index + " out of range."); + } + }; + this.playRandom = function () { + if (this.sounds.length > 0) { + this.play(Math.floor(Math.random() * this.sounds.length)); + } else { + print("[ERROR] libraries/soundArray.js:playRandom() : Array is empty."); + } + }; + this.updateAudioPosition = function() { + var position = MyAvatar.position; + var forwardVector = Quat.getFront(MyAvatar.orientation); + this.audioOptions.position = Vec3.sum(position, forwardVector); + }; +}; diff --git a/examples/notifications.js b/examples/notifications.js index 5527fc35fc..2449873f27 100644 --- a/examples/notifications.js +++ b/examples/notifications.js @@ -1,13 +1,13 @@ -// -// notifications.js -// Version 0.801 -// Created by Adrian +// +// notifications.js +// Version 0.801 +// Created by Adrian // // Adrian McCarlie 8-10-14 // This script demonstrates on-screen overlay type notifications. // Copyright 2014 High Fidelity, Inc. // -// +// // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -20,29 +20,29 @@ // CTRL/m for mic mute and unmute. // System generated notifications: -// Displays users online at startup. +// Displays users online at startup. // If Screen is resized. // Triggers notification if @MyUserName is mentioned in chat. // Announces existing user logging out. // Announces new user logging in. // If mic is muted for any reason. -// +// // To add a new System notification type: // -// 1. Set the Event Connector at the bottom of the script. -// example: +// 1. Set the Event Connector at the bottom of the script. +// example: // GlobalServices.incomingMessage.connect(onIncomingMessage); // -// 2. Create a new function to produce a text string, do not include new line returns. +// 2. Create a new function to produce a text string, do not include new line returns. // example: // function onIncomingMessage(user, message) { -// //do stuff here; +// //do stuff here; // var text = "This is a notification"; // wordWrap(text); // } // // This new function must call wordWrap(text) if the length of message is longer than 42 chars or unknown. -// wordWrap() will format the text to fit the notifications overlay and send it to createNotification(text). +// wordWrap() will format the text to fit the notifications overlay and send it to createNotification(text). // If the message is 42 chars or less you should bypass wordWrap() and call createNotification() directly. @@ -53,37 +53,44 @@ // 3. Call createNotifications(text) parsing the text. // example: // if (key.text == "q") { //queries number of users online -// var numUsers = GlobalServices.onlineUsers.length; -// var welcome = "There are " + numUsers + " users online now."; -// createNotification(welcome); +// var numUsers = GlobalServices.onlineUsers.length; +// var welcome = "There are " + numUsers + " users online now."; +// createNotification(welcome); // } - +Script.include("./libraries/globals.js"); +Script.include("./libraries/soundArray.js"); var width = 340.0; //width of notification overlay var height = 40.0; // height of a single line notification overlay var windowDimensions = Controller.getViewportDimensions(); // get the size of the interface window var overlayLocationX = (windowDimensions.x - (width + 20.0));// positions window 20px from the right of the interface window -var buttonLocationX = overlayLocationX + (width - 28.0); +var buttonLocationX = overlayLocationX + (width - 28.0); var locationY = 20.0; // position down from top of interface window var topMargin = 13.0; var leftMargin = 10.0; var textColor = { red: 228, green: 228, blue: 228}; // text color -var backColor = { red: 2, green: 2, blue: 2}; // background color was 38,38,38 +var backColor = { red: 2, green: 2, blue: 2}; // background color was 38,38,38 var backgroundAlpha = 0; var fontSize = 12.0; var persistTime = 10.0; // time in seconds before notification fades var clickedText = false; var frame = 0; -var ourWidth = Window.innerWidth; -var ourHeight = Window.innerHeight; +var ourWidth = Window.innerWidth; +var ourHeight = Window.innerHeight; var text = "placeholder"; var last_users = GlobalServices.onlineUsers; var users = []; var ctrlIsPressed = false; var ready = true; - + +var randomSounds = new SoundArray({}, true); +var numberOfSounds = 2; +for (var i = 1; i <= numberOfSounds; i++) { + randomSounds.addSound(HIFI_PUBLIC_BUCKET + "sounds/UI/notification-general" + i + ".raw"); +} + // When our script shuts down, we should clean up all of our overlays -function scriptEnding() { +function scriptEnding() { for (i = 0; i < notifications.length; i++) { Overlays.deleteOverlay(notifications[i]); Overlays.deleteOverlay(buttons[i]); @@ -92,7 +99,7 @@ function scriptEnding() { Script.scriptEnding.connect(scriptEnding); var notifications = []; -var buttons = []; +var buttons = []; var times = []; var heights = []; var myAlpha = []; @@ -117,7 +124,7 @@ function createNotification(text) { height = height + extraLine; var overlayProperties = { x: overlayLocationX, - y: level, + y: level, width: width, height: height, color: textColor, @@ -126,10 +133,10 @@ function createNotification(text) { topMargin: topMargin, leftMargin: leftMargin, font: {size: fontSize}, - text: text, + text: text, }; var bLevel = level + 12.0; - var buttonProperties = { + var buttonProperties = { x: buttonLocationX, y: bLevel, width: 10.0, @@ -139,17 +146,15 @@ function createNotification(text) { color: { red: 255, green: 255, blue: 255}, visible: true, alpha: backgroundAlpha, - }; - - Notify(overlayProperties, buttonProperties, height); - + }; + Notify(overlayProperties, buttonProperties, height); } -// Pushes data to each array and sets up data for 2nd dimension array +// Pushes data to each array and sets up data for 2nd dimension array // to handle auxiliary data not carried by the overlay class -// specifically notification "heights", "times" of creation, and . -function Notify(notice, button, height){ - +// specifically notification "heights", "times" of creation, and . +function Notify(notice, button, height){ + randomSounds.playRandom(); notifications.push((Overlays.addOverlay("text", notice))); buttons.push((Overlays.addOverlay("image",button))); times.push(new Date().getTime() / 1000); @@ -162,14 +167,14 @@ function Notify(notice, button, height){ } function fadeIn(noticeIn, buttonIn) { - var myLength = arrays.length; + var myLength = arrays.length; var q = 0; var pauseTimer = null; - pauseTimer = Script.setInterval(function() { + pauseTimer = Script.setInterval(function() { q++; qFade = q / 10.0; - Overlays.editOverlay(noticeIn, {alpha: qFade}); - Overlays.editOverlay(buttonIn, {alpha: qFade}); + Overlays.editOverlay(noticeIn, {alpha: qFade}); + Overlays.editOverlay(buttonIn, {alpha: qFade}); if (q >= 9.0) { Script.clearInterval(pauseTimer); } @@ -178,11 +183,11 @@ function fadeIn(noticeIn, buttonIn) { // push data from above to the 2 dimensional array -function createArrays(notice, button, createTime, height, myAlpha) { - arrays.push([notice, button, createTime, height, myAlpha]); +function createArrays(notice, button, createTime, height, myAlpha) { + arrays.push([notice, button, createTime, height, myAlpha]); } // handles mouse clicks on buttons -function mousePressEvent(event) { +function mousePressEvent(event) { var clickedOverlay = Overlays.getOverlayAtPoint({x: event.x, y: event.y}); //identify which overlay was clicked for (i = 0; i < buttons.length; i++) { //if user clicked a button if(clickedOverlay == buttons[i]) { @@ -192,10 +197,10 @@ function mousePressEvent(event) { buttons.splice(i, 1); times.splice(i, 1); heights.splice(i, 1); - myAlpha.splice(i, 1); + myAlpha.splice(i, 1); arrays.splice(i, 1); } - } + } } // Control key remains active only while key is held down @@ -204,19 +209,19 @@ function keyReleaseEvent(key) { ctrlIsPressed = false; } } - + // Triggers notification on specific key driven events function keyPressEvent(key) { if (key.key == 16777249) { ctrlIsPressed = true; } if (key.text == "q") { //queries number of users online - var numUsers = GlobalServices.onlineUsers.length; - var welcome = "There are " + numUsers + " users online now."; - createNotification(welcome); - } + var numUsers = GlobalServices.onlineUsers.length; + var welcome = "There are " + numUsers + " users online now."; + createNotification(welcome); + } - if (key.text == "s") { + if (key.text == "s") { if (ctrlIsPressed == true){ var noteString = "Snapshot taken."; createNotification(noteString); @@ -241,7 +246,7 @@ function stringDivider(str, slotWidth, spaceReplacer) { return left + spaceReplacer + stringDivider(right, slotWidth, spaceReplacer); } } - return str; + return str; } // This fires a notification on window resize @@ -249,7 +254,7 @@ function checkSize(){ if((Window.innerWidth != ourWidth)||(Window.innerHeight != ourHeight)) { var windowResize = "Window has been resized"; ourWidth = Window.innerWidth; - ourHeight = Window.innerHeight; + ourHeight = Window.innerHeight; windowDimensions = Controller.getViewportDimensions(); overlayLocationX = (windowDimensions.x - (width + 60.0)); buttonLocationX = overlayLocationX + (width - 35.0); @@ -261,12 +266,12 @@ function checkSize(){ function onOnlineUsersChanged(users) { for (user in users) { if (last_users.indexOf(users[user]) == -1.0) { - createNotification(users[user] + " has joined"); + createNotification(users[user] + " has joined"); } } for (user in last_users) { if (users.indexOf(last_users[user]) == -1.0) { - createNotification(last_users[user] + " has left"); + createNotification(last_users[user] + " has left"); } } last_users = users; @@ -294,7 +299,7 @@ function update(){ checkSize(); // checks for size change to trigger windowResize notification locationY = 20.0; for (var i = 0; i < arrays.length; i++) { //repositions overlays as others fade - var nextOverlay = Overlays.getOverlayAtPoint({x: overlayLocationX, y: locationY}); + var nextOverlay = Overlays.getOverlayAtPoint({x: overlayLocationX, y: locationY}); Overlays.editOverlay(notifications[i], { x:overlayLocationX, y:locationY}); Overlays.editOverlay(buttons[i], { x:buttonLocationX, y:locationY + 12.0}); locationY = locationY + arrays[i][3]; @@ -302,12 +307,12 @@ function update(){ } // This checks the age of the notification and prepares to fade it after 9.0 seconds (var persistTime - 1) - for (var i = 0; i < arrays.length; i++) { - if (ready){ - var j = arrays[i][2]; - var k = j + persistTime; + for (var i = 0; i < arrays.length; i++) { + if (ready) { + var j = arrays[i][2]; + var k = j + persistTime; if (k < (new Date().getTime() / 1000)) { - ready = false; + ready = false; noticeOut = arrays[i][0]; buttonOut = arrays[i][1]; var arraysOut = i; @@ -322,11 +327,11 @@ function fadeOut(noticeOut, buttonOut, arraysOut) { var myLength = arrays.length; var r = 9.0; var pauseTimer = null; - pauseTimer = Script.setInterval(function() { + pauseTimer = Script.setInterval(function() { r--; - rFade = r / 10.0; - Overlays.editOverlay(noticeOut, {alpha: rFade}); - Overlays.editOverlay(buttonOut, {alpha: rFade}); + rFade = r / 10.0; + Overlays.editOverlay(noticeOut, {alpha: rFade}); + Overlays.editOverlay(buttonOut, {alpha: rFade}); if (r < 0) { dismiss(noticeOut, buttonOut, arraysOut); arrays.splice(arraysOut, 1); @@ -337,8 +342,8 @@ function fadeOut(noticeOut, buttonOut, arraysOut) { } // This handles the final dismissal of a notification after fading -function dismiss(firstNoteOut, firstButOut, firstOut) { - var working = firstOut +function dismiss(firstNoteOut, firstButOut, firstOut) { + var working = firstOut; Overlays.deleteOverlay(firstNoteOut); Overlays.deleteOverlay(firstButOut); notifications.splice(firstOut, 1); From bd9668b9fa259c751c0f59ab128cc84429c9320b Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Thu, 15 Jan 2015 18:23:43 -0800 Subject: [PATCH 08/15] Change WetLevel modulation --- assignment-client/src/audio/AudioMixer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assignment-client/src/audio/AudioMixer.cpp b/assignment-client/src/audio/AudioMixer.cpp index ee681b9942..1aa0c75086 100644 --- a/assignment-client/src/audio/AudioMixer.cpp +++ b/assignment-client/src/audio/AudioMixer.cpp @@ -487,11 +487,11 @@ void AudioMixer::sendAudioEnvironmentPacket(SharedNodePointer node) { // Modulate wet level with distance to wall float MIN_ATTENUATION_DISTANCE = 2.0f; - float MAX_ATTENUATION = 0.75f; + float MAX_ATTENUATION = -12; // dB glm::vec3 distanceToWalls = (box.getDimensions() / 2.0f) - glm::abs(streamPosition - box.calcCenter()); float distanceToClosestWall = glm::min(distanceToWalls.x, distanceToWalls.z); if (distanceToClosestWall < MIN_ATTENUATION_DISTANCE) { - wetLevel *= 1.0f - MAX_ATTENUATION * (1.0f - distanceToClosestWall / MIN_ATTENUATION_DISTANCE); + wetLevel += MAX_ATTENUATION * (1.0f - distanceToClosestWall / MIN_ATTENUATION_DISTANCE); } break; } From 5a81b8a5906be87d6ae2cfec2388b17151976a2e Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 13 Feb 2015 10:17:08 +0100 Subject: [PATCH 09/15] Do all the reverb at the input level --- libraries/audio-client/src/AudioClient.cpp | 53 +++++++++++++--------- libraries/audio-client/src/AudioClient.h | 2 +- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index d72fa46fc3..6dcd1fa733 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -616,9 +616,10 @@ void AudioClient::setReverbOptions(const AudioEffectOptions* options) { } } -void AudioClient::addReverb(ty_gverb* gverb, int16_t* samplesData, int numSamples, QAudioFormat& audioFormat, bool noEcho) { +void AudioClient::addReverb(ty_gverb* gverb, int16_t* samplesData, int16_t* reverbAlone, int numSamples, + QAudioFormat& audioFormat, bool noEcho) { float wetFraction = DB_CO(_reverbOptions->getWetLevel()); - float dryFraction = (noEcho) ? 0.0f : (1.0f - wetFraction); + float dryFraction = 1.0f - wetFraction; float lValue,rValue; for (int sample = 0; sample < numSamples; sample += audioFormat.channelCount()) { @@ -633,11 +634,19 @@ void AudioClient::addReverb(ty_gverb* gverb, int16_t* samplesData, int numSample int lResult = glm::clamp((int)(samplesData[j] * dryFraction + lValue * wetFraction), AudioConstants::MIN_SAMPLE_VALUE, AudioConstants::MAX_SAMPLE_VALUE); samplesData[j] = (int16_t)lResult; + + if (noEcho) { + reverbAlone[j] = (int16_t)lValue * wetFraction; + } } else if (j == (sample + 1)) { // right channel int rResult = glm::clamp((int)(samplesData[j] * dryFraction + rValue * wetFraction), AudioConstants::MIN_SAMPLE_VALUE, AudioConstants::MAX_SAMPLE_VALUE); samplesData[j] = (int16_t)rResult; + + if (noEcho) { + reverbAlone[j] = (int16_t)rValue * wetFraction; + } } else { // ignore channels above 2 } @@ -647,9 +656,8 @@ void AudioClient::addReverb(ty_gverb* gverb, int16_t* samplesData, int numSample void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) { // If there is server echo, reverb will be applied to the recieved audio stream so no need to have it here. - bool hasLocalReverb = (_reverb || _receivedAudioStream.hasReverb()) && - !_shouldEchoToServer; - if (_muted || !_audioOutput || (!_shouldEchoLocally && !hasLocalReverb)) { + bool hasReverb = _reverb || _receivedAudioStream.hasReverb(); + if (_muted || !_audioOutput || (!_shouldEchoLocally && !hasReverb)) { return; } @@ -671,24 +679,30 @@ void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) { } } - static QByteArray loopBackByteArray; - loopBackByteArray.resize(numDestinationSamplesRequired(_inputFormat, _outputFormat, - inputByteArray.size() / sizeof(int16_t)) * sizeof(int16_t)); + int numInputSamples = inputByteArray.size() / sizeof(int16_t); + int16_t* inputSamples = reinterpret_cast(inputByteArray.data()); - possibleResampling(_loopbackResampler, - reinterpret_cast(inputByteArray.data()), - reinterpret_cast(loopBackByteArray.data()), - inputByteArray.size() / sizeof(int16_t), loopBackByteArray.size() / sizeof(int16_t), - _inputFormat, _outputFormat); + static QByteArray reverbAlone; + reverbAlone.resize(inputByteArray.size()); + int16_t* reverbAloneSamples = reinterpret_cast(reverbAlone.data()); - if (hasLocalReverb) { - int16_t* loopbackSamples = reinterpret_cast(loopBackByteArray.data()); - int numLoopbackSamples = loopBackByteArray.size() / sizeof(int16_t); + if (hasReverb) { updateGverbOptions(); - addReverb(_gverbLocal, loopbackSamples, numLoopbackSamples, _outputFormat, !_shouldEchoLocally); + addReverb(_gverbLocal, inputSamples, reverbAloneSamples, numInputSamples, + _outputFormat, !_shouldEchoLocally); } if (_loopbackOutputDevice) { + static QByteArray loopBackByteArray; + int numLoopbackSamples = numDestinationSamplesRequired(_inputFormat, _outputFormat, numInputSamples); + loopBackByteArray.resize(numLoopbackSamples * sizeof(int16_t)); + + possibleResampling(_loopbackResampler, + (_shouldEchoLocally) ? inputSamples : reverbAloneSamples, + reinterpret_cast(loopBackByteArray.data()), + numInputSamples, numLoopbackSamples, + _inputFormat, _outputFormat); + _loopbackOutputDevice->write(loopBackByteArray); } } @@ -884,11 +898,6 @@ void AudioClient::processReceivedSamples(const QByteArray& inputBuffer, QByteArr reinterpret_cast(outputBuffer.data()), numNetworkOutputSamples, numDeviceOutputSamples, _desiredOutputFormat, _outputFormat); - - if(_reverb || _receivedAudioStream.hasReverb()) { - updateGverbOptions(); - addReverb(_gverb, (int16_t*)outputBuffer.data(), numDeviceOutputSamples, _outputFormat); - } } void AudioClient::sendMuteEnvironmentPacket() { diff --git a/libraries/audio-client/src/AudioClient.h b/libraries/audio-client/src/AudioClient.h index 0adf60fea8..183d8bc63f 100644 --- a/libraries/audio-client/src/AudioClient.h +++ b/libraries/audio-client/src/AudioClient.h @@ -251,7 +251,7 @@ private: ty_gverb* createGverbFilter(); void configureGverbFilter(ty_gverb* filter); void updateGverbOptions(); - void addReverb(ty_gverb* gverb, int16_t* samples, int numSamples, QAudioFormat& format, bool noEcho = false); + void addReverb(ty_gverb* gverb, int16_t* samples, int16_t* reverbAlone, int numSamples, QAudioFormat& format, bool noEcho = false); void handleLocalEchoAndReverb(QByteArray& inputByteArray); From f2790302839f3a150760efe077c4cfd9a26ab7b4 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 16 Feb 2015 16:15:03 +0100 Subject: [PATCH 10/15] Remove _gverbLocal --- libraries/audio-client/src/AudioClient.cpp | 19 ++----------------- libraries/audio-client/src/AudioClient.h | 1 - 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index fd4f23fabf..7277ec4d90 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -104,7 +104,6 @@ AudioClient::AudioClient() : _audioSourceInjectEnabled(false), _reverb(false), _reverbOptions(&_scriptReverbOptions), - _gverbLocal(NULL), _gverb(NULL), _inputToNetworkResampler(NULL), _networkToOutputResampler(NULL), @@ -130,20 +129,14 @@ AudioClient::AudioClient() : connect(updateTimer, &QTimer::timeout, this, &AudioClient::checkDevices); updateTimer->start(DEVICE_CHECK_INTERVAL_MSECS); - // create GVerb filters + // create GVerb filter _gverb = createGverbFilter(); - _gverbLocal = createGverbFilter(); - // configure filters configureGverbFilter(_gverb); - configureGverbFilter(_gverbLocal); } AudioClient::~AudioClient() { stop(); - if (_gverbLocal) { - gverb_free(_gverbLocal); - } if (_gverb) { gverb_free(_gverb); } @@ -158,7 +151,6 @@ void AudioClient::reset() { _inputGain.reset(); gverb_flush(_gverb); - gverb_flush(_gverbLocal); } void AudioClient::audioMixerKilled() { @@ -582,9 +574,6 @@ void AudioClient::updateGverbOptions() { gverb_free(_gverb); _gverb = createGverbFilter(); configureGverbFilter(_gverb); - gverb_free(_gverbLocal); - _gverbLocal = createGverbFilter(); - configureGverbFilter(_gverbLocal); } } @@ -593,7 +582,6 @@ void AudioClient::setReverb(bool reverb) { if (!_reverb) { gverb_flush(_gverb); - gverb_flush(_gverbLocal); } } @@ -616,9 +604,6 @@ void AudioClient::setReverbOptions(const AudioEffectOptions* options) { gverb_free(_gverb); _gverb = createGverbFilter(); configureGverbFilter(_gverb); - gverb_free(_gverbLocal); - _gverbLocal = createGverbFilter(); - configureGverbFilter(_gverbLocal); } } @@ -694,7 +679,7 @@ void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) { if (hasReverb) { updateGverbOptions(); - addReverb(_gverbLocal, inputSamples, reverbAloneSamples, numInputSamples, + addReverb(_gverb, inputSamples, reverbAloneSamples, numInputSamples, _outputFormat, !_shouldEchoLocally); } diff --git a/libraries/audio-client/src/AudioClient.h b/libraries/audio-client/src/AudioClient.h index bbba55afd2..d091fc0cc3 100644 --- a/libraries/audio-client/src/AudioClient.h +++ b/libraries/audio-client/src/AudioClient.h @@ -243,7 +243,6 @@ private: AudioEffectOptions _scriptReverbOptions; AudioEffectOptions _zoneReverbOptions; AudioEffectOptions* _reverbOptions; - ty_gverb* _gverbLocal; ty_gverb* _gverb; // possible soxr streams needed for resample From 17ce2e820fe9bf06bb054305f49d029662f90b80 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 16 Feb 2015 17:30:20 +0100 Subject: [PATCH 11/15] Cleanup addReverb() code --- libraries/audio-client/src/AudioClient.cpp | 39 ++++++++++++---------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index 7277ec4d90..2264e31131 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -658,6 +658,10 @@ void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) { if (!_loopbackOutputDevice && _loopbackAudioOutput) { // we didn't have the loopback output device going so set that up now _loopbackOutputDevice = _loopbackAudioOutput->start(); + + if (!_loopbackOutputDevice) { + return; + } } // do we need to setup a resampler? @@ -670,32 +674,31 @@ void AudioClient::handleLocalEchoAndReverb(QByteArray& inputByteArray) { } } - int numInputSamples = inputByteArray.size() / sizeof(int16_t); - int16_t* inputSamples = reinterpret_cast(inputByteArray.data()); + static QByteArray reverbAlone; // Intermediary for local reverb with no echo + static QByteArray loopBackByteArray; - static QByteArray reverbAlone; - reverbAlone.resize(inputByteArray.size()); + int numInputSamples = inputByteArray.size() / sizeof(int16_t); + int numLoopbackSamples = numDestinationSamplesRequired(_inputFormat, _outputFormat, numInputSamples); + + reverbAlone.resize(numInputSamples * sizeof(int16_t)); + loopBackByteArray.resize(numLoopbackSamples * sizeof(int16_t)); + + int16_t* inputSamples = reinterpret_cast(inputByteArray.data()); int16_t* reverbAloneSamples = reinterpret_cast(reverbAlone.data()); + int16_t* loopbackSamples = reinterpret_cast(loopBackByteArray.data()); if (hasReverb) { updateGverbOptions(); addReverb(_gverb, inputSamples, reverbAloneSamples, numInputSamples, - _outputFormat, !_shouldEchoLocally); + _inputFormat, !_shouldEchoLocally); } - if (_loopbackOutputDevice) { - static QByteArray loopBackByteArray; - int numLoopbackSamples = numDestinationSamplesRequired(_inputFormat, _outputFormat, numInputSamples); - loopBackByteArray.resize(numLoopbackSamples * sizeof(int16_t)); - - possibleResampling(_loopbackResampler, - (_shouldEchoLocally) ? inputSamples : reverbAloneSamples, - reinterpret_cast(loopBackByteArray.data()), - numInputSamples, numLoopbackSamples, - _inputFormat, _outputFormat); - - _loopbackOutputDevice->write(loopBackByteArray); - } + possibleResampling(_loopbackResampler, + (_shouldEchoLocally) ? inputSamples : reverbAloneSamples, loopbackSamples, + numInputSamples, numLoopbackSamples, + _inputFormat, _outputFormat); + + _loopbackOutputDevice->write(loopBackByteArray); } void AudioClient::handleAudioInput() { From 96b3114a36a63ff99c6193bb6e41da140ddfdeb1 Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Tue, 17 Feb 2015 23:37:37 +0100 Subject: [PATCH 12/15] style --- examples/notifications.js | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/notifications.js b/examples/notifications.js index 88198a2ea1..287bfd0b36 100644 --- a/examples/notifications.js +++ b/examples/notifications.js @@ -474,7 +474,6 @@ function onOnlineUsersChanged(users) { if (last_users.indexOf(users[i]) === -1.0) { createNotification(users[i] + " has joined"); } - } for (i = 0; i < last_users.length; i += 1) { From d10f37291b3703a7ece68d3d88e099ab47f4fee9 Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Wed, 18 Feb 2015 18:25:16 +0100 Subject: [PATCH 13/15] check if sounds are downloaded before play thanks @Atlante45 --- examples/libraries/soundArray.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/libraries/soundArray.js b/examples/libraries/soundArray.js index 0da2db07d3..813621fb4b 100644 --- a/examples/libraries/soundArray.js +++ b/examples/libraries/soundArray.js @@ -20,7 +20,9 @@ SoundArray = function(audioOptions, autoUpdateAudioPosition) { if (this.autoUpdateAudioPosition) { this.updateAudioPosition(); } - Audio.playSound(this.sounds[index], this.audioOptions); + if (this.sounds[index].downloaded) { + Audio.playSound(this.sounds[index], this.audioOptions); + } } else { print("[ERROR] libraries/soundArray.js:play() : Index " + index + " out of range."); } From 758a5522674c2de2b07f0646aa8964927abea97c Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 18 Feb 2015 09:59:33 -0800 Subject: [PATCH 14/15] make sure the Agent has a SoundCache available --- assignment-client/src/Agent.cpp | 1 + assignment-client/src/AssignmentClient.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/assignment-client/src/Agent.cpp b/assignment-client/src/Agent.cpp index 4755d9137a..b66226e1a5 100644 --- a/assignment-client/src/Agent.cpp +++ b/assignment-client/src/Agent.cpp @@ -47,6 +47,7 @@ Agent::Agent(const QByteArray& packet) : _scriptEngine.getEntityScriptingInterface()->setPacketSender(&_entityEditSender); DependencyManager::set(); + DependencyManager::set(); } void Agent::readPendingDatagrams() { diff --git a/assignment-client/src/AssignmentClient.cpp b/assignment-client/src/AssignmentClient.cpp index 80f3cbab5e..bf67d4d597 100644 --- a/assignment-client/src/AssignmentClient.cpp +++ b/assignment-client/src/AssignmentClient.cpp @@ -136,7 +136,6 @@ AssignmentClient::AssignmentClient(int &argc, char **argv) : // Create Singleton objects on main thread NetworkAccessManager::getInstance(); - auto soundCache = DependencyManager::get(); } void AssignmentClient::sendAssignmentRequest() { From 5a3ef34d1edef3ed4b974d3b012bddf18b83844e Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 18 Feb 2015 16:14:51 -0800 Subject: [PATCH 15/15] use http link for gverb in case no git available --- cmake/externals/gverb/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/externals/gverb/CMakeLists.txt b/cmake/externals/gverb/CMakeLists.txt index 19a44781b1..a73b192fee 100644 --- a/cmake/externals/gverb/CMakeLists.txt +++ b/cmake/externals/gverb/CMakeLists.txt @@ -8,7 +8,7 @@ include(ExternalProject) ExternalProject_Add( ${EXTERNAL_NAME} PREFIX ${EXTERNAL_NAME} - GIT_REPOSITORY https://github.com/birarda/gverb.git + URL http://hifi-public.s3.amazonaws.com/dependencies/gverb-master.zip CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH= LOG_DOWNLOAD ON )