From 0794d95bdcaa4625571759e6dd1bc58dca6619e9 Mon Sep 17 00:00:00 2001 From: David Kelly Date: Mon, 10 Oct 2016 19:58:16 -0700 Subject: [PATCH] Fix merge Take the new crowd-agent.js, my changes were temporary. --- .../tests/performance/crowd-agent.js | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/scripts/developer/tests/performance/crowd-agent.js b/scripts/developer/tests/performance/crowd-agent.js index ffcff331d7..6b73d66c4f 100644 --- a/scripts/developer/tests/performance/crowd-agent.js +++ b/scripts/developer/tests/performance/crowd-agent.js @@ -15,9 +15,6 @@ // a script like summon.js calls up to n avatars to be around you. var MESSAGE_CHANNEL = "io.highfidelity.summon-crowd"; -var soundIntervalId; -var SOUND_POLL_INTERVAL = 500; // ms -var SOUND_URL = "http://howard-stearns.github.io/models/sounds/piano1.wav"; print('crowd-agent version 2'); @@ -67,26 +64,9 @@ function startAgent(parameters) { // Can also be used to update. Avatar.startAnimation(data.url, data.fps || 30, 1.0, (data.loopFlag === undefined) ? true : data.loopFlag, false, data.startFrame || 0, data.endFrame); } print('crowd-agent avatars started'); - Agent.isListeningToAudioStream = true; - soundIntervalId = playSound(); - print('crowd-agent sound loop started'); -} -function playSound() { - // Load a sound - var sound = SoundCache.getSound(SOUND_URL); - function loopSound(sound) { - // since we cannot loop, for now lets just see if we are making sounds. If - // not, then play a sound. - if (!Agent.isPlayingAvatarSound) { - Agent.playAvatarSound(sound); - } - }; - return Script.setInterval(function() {loopSound(sound);}, SOUND_POLL_INTERVAL); } function stopAgent(parameters) { Agent.isAvatar = false; - Agent.isListeningToAudioStream = false; - Script.clearInterval(soundIntervalId); print('crowd-agent stopped', JSON.stringify(parameters), JSON.stringify(Agent)); }