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.
This commit is contained in:
David Kelly 2016-11-01 09:12:35 -07:00
parent 5714063eff
commit fb2968a419

View file

@ -88,6 +88,7 @@ void Agent::playAvatarSound(SharedSoundPointer sound) {
QMetaObject::invokeMethod(this, "playAvatarSound", Q_ARG(SharedSoundPointer, sound));
return;
} else {
_numAvatarSoundSentBytes = 0;
setAvatarSound(sound);
}
}