From 5c4f6c741c9badfa9fe5750237ba4dd0d9f9def7 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 20 Sep 2018 11:55:55 -0700 Subject: [PATCH] fix agent audio packet send when encoder is flushed --- assignment-client/src/Agent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assignment-client/src/Agent.cpp b/assignment-client/src/Agent.cpp index 639e9f924b..1db0f0b6dc 100644 --- a/assignment-client/src/Agent.cpp +++ b/assignment-client/src/Agent.cpp @@ -788,7 +788,7 @@ void Agent::processAgentAvatarAudio() { // seek past the sequence number, will be packed when destination node is known audioPacket->seek(sizeof(quint16)); - if (silentFrame) { + if (silentFrame && !_flushEncoder) { if (!_isListeningToAudioStream) { // if we have a silent frame and we're not listening then just send nothing and break out of here @@ -810,7 +810,7 @@ void Agent::processAgentAvatarAudio() { // no matter what, the loudness should be set to 0 computeLoudness(nullptr, scriptedAvatar); - } else if (nextSoundOutput) { + } else if (nextSoundOutput || _flushEncoder) { // write the codec audioPacket->writeString(_selectedCodecName);