From 546442ff9a26f5dce6325e502ebe8e4435e17e46 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 12 Jun 2015 12:32:40 -0700 Subject: [PATCH 1/4] Fix sound URLs Three slashes needed for Windows. --- examples/dialTone.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/dialTone.js b/examples/dialTone.js index b55e654f25..adbbd26acb 100644 --- a/examples/dialTone.js +++ b/examples/dialTone.js @@ -11,8 +11,8 @@ // // setup the local sound we're going to use -var connectSound = SoundCache.getSound("file://" + Paths.resources + "sounds/hello.wav"); -var disconnectSound = SoundCache.getSound("file://" + Paths.resources + "sounds/goodbye.wav"); +var connectSound = SoundCache.getSound("file:///" + Paths.resources + "sounds/hello.wav"); +var disconnectSound = SoundCache.getSound("file:///" + Paths.resources + "sounds/goodbye.wav"); // setup the options needed for that sound var connectSoundOptions = { From f0b6b0f5481ee2bebfa8f18377dd509c08a44618 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 12 Jun 2015 12:33:17 -0700 Subject: [PATCH 2/4] Play sound upon microphone being muted --- examples/dialTone.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/dialTone.js b/examples/dialTone.js index adbbd26acb..eb1fc5ec1c 100644 --- a/examples/dialTone.js +++ b/examples/dialTone.js @@ -13,17 +13,24 @@ // setup the local sound we're going to use var connectSound = SoundCache.getSound("file:///" + Paths.resources + "sounds/hello.wav"); var disconnectSound = SoundCache.getSound("file:///" + Paths.resources + "sounds/goodbye.wav"); +var micMutedSound = SoundCache.getSound("file:///" + Paths.resources + "sounds/goodbye.wav"); // setup the options needed for that sound -var connectSoundOptions = { +var soundOptions = { localOnly: true }; // play the sound locally once we get the first audio packet from a mixer Audio.receivedFirstPacket.connect(function(){ - Audio.playSound(connectSound, connectSoundOptions); + Audio.playSound(connectSound, soundOptions); }); Audio.disconnected.connect(function(){ - Audio.playSound(disconnectSound, connectSoundOptions); + Audio.playSound(disconnectSound, soundOptions); +}); + +AudioDevice.muteToggled.connect(function () { + if (AudioDevice.getMuted()) { + Audio.playSound(micMutedSound, soundOptions); + } }); From c369e305f84a01b2c95566b29e5319329689ed5d Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 12 Jun 2015 12:33:30 -0700 Subject: [PATCH 3/4] Include dialTone.js in default scripts --- examples/defaultScripts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/defaultScripts.js b/examples/defaultScripts.js index 61bed8d9b1..b6462b7fc3 100644 --- a/examples/defaultScripts.js +++ b/examples/defaultScripts.js @@ -19,3 +19,4 @@ Script.load("users.js"); Script.load("grab.js"); Script.load("pointer.js"); Script.load("directory.js"); +Script.load("dialTone.js"); From e16116ce7891c486e2449d2160e2201bd80a3b20 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 12 Jun 2015 12:33:42 -0700 Subject: [PATCH 4/4] Have auto mute mic upon losing camera tracking disabled by default --- interface/src/Menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 6242318170..eafcc4c8e8 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -407,7 +407,7 @@ Menu::Menu() { addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::MuteFaceTracking, Qt::CTRL | Qt::SHIFT | Qt::Key_F, true, // DDE face tracking is on by default qApp, SLOT(toggleFaceTrackerMute())); - addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::AutoMuteAudio, 0, true); + addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::AutoMuteAudio, 0, false); #endif auto avatarManager = DependencyManager::get();