From e63e9bc0176cdfd5b12b0c974000b0fc0c9110e1 Mon Sep 17 00:00:00 2001 From: David Kelly Date: Mon, 31 Oct 2016 13:25:22 -0700 Subject: [PATCH] Remove HRTFs for Avatar too Turns out there was already a function for that, if you just call removeHRTFForStream without a 2nd param, it appears to just delete the audio with uuid of QUuid() which is the avatar's mic. That is what we want, so cool. --- assignment-client/src/audio/AudioMixer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assignment-client/src/audio/AudioMixer.cpp b/assignment-client/src/audio/AudioMixer.cpp index e5a2c9def5..602dd233ad 100644 --- a/assignment-client/src/audio/AudioMixer.cpp +++ b/assignment-client/src/audio/AudioMixer.cpp @@ -603,6 +603,9 @@ void AudioMixer::handleKillAvatarPacket(QSharedPointer packet, auto clientData = dynamic_cast(sendingNode->getLinkedData()); if (clientData) { clientData->removeAgentAvatarAudioStream(); + // when you don't specify a stream, this removes just the QUuid() + // stream (which is the avatar's mic stream) + clientData->removeHRTFForStream(sendingNode->getUUID()); } }