From a880ca126291fb4bd8b6007f96273b2c5595c815 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Wed, 26 Apr 2017 16:51:26 -0700 Subject: [PATCH] Reduce log spam --- scripts/tutorials/halfDuplex.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/tutorials/halfDuplex.js b/scripts/tutorials/halfDuplex.js index fe608eedec..e1ed132233 100644 --- a/scripts/tutorials/halfDuplex.js +++ b/scripts/tutorials/halfDuplex.js @@ -34,13 +34,15 @@ Script.update.connect(function () { var avatars = AvatarList.getAvatarIdentifiers(); avatars.forEach(function (id) { var avatar = AvatarList.getAvatar(id); - if ((MyAvatar.sessionUUID !== avatar.sessionUUID) && (avatar.displayName.indexOf(MICROPHONE_DISPLAY_NAME) !== 0)) { - othersLoudness += Math.round(avatar.audioLoudness); - } - // Mute other microphone avatars to not feedback with muti-source environment - if (avatar.displayName.indexOf(MICROPHONE_DISPLAY_NAME) === 0) { - if (!Users.getPersonalMuteStatus(avatar.sessionUUID)) { - Users.personalMute(avatar.sessionUUID, true); + if (MyAvatar.sessionUUID !== avatar.sessionUUID) { + if (avatar.displayName.indexOf(MICROPHONE_DISPLAY_NAME) !== 0) { + othersLoudness += Math.round(avatar.audioLoudness); + } + // Mute other microphone avatars to not feedback with muti-source environment + if (avatar.displayName.indexOf(MICROPHONE_DISPLAY_NAME) === 0) { + if (!Users.getPersonalMuteStatus(avatar.sessionUUID)) { + Users.personalMute(avatar.sessionUUID, true); + } } } });