From fb2968a4191675610451b185d51fd0c1e362e4c8 Mon Sep 17 00:00:00 2001 From: David Kelly Date: Tue, 1 Nov 2016 09:12:35 -0700 Subject: [PATCH] Reset bytes sent counter when setting avatar sound It could be past the end of the buffer if you changed sounds, and the new one is shorter. Won't happen with our current tests, but that could change, and in general no reason it couldn't happen. --- assignment-client/src/Agent.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/assignment-client/src/Agent.cpp b/assignment-client/src/Agent.cpp index 02d86b5e56..1da33f5bd7 100644 --- a/assignment-client/src/Agent.cpp +++ b/assignment-client/src/Agent.cpp @@ -88,6 +88,7 @@ void Agent::playAvatarSound(SharedSoundPointer sound) { QMetaObject::invokeMethod(this, "playAvatarSound", Q_ARG(SharedSoundPointer, sound)); return; } else { + _numAvatarSoundSentBytes = 0; setAvatarSound(sound); } }