Merge pull request #8523 from ZappoMan/fixAgentAvatarAudio

include the codec name in the agent avatar audio stream
This commit is contained in:
Brad Hefta-Gaub 2016-08-26 12:42:20 -07:00 committed by GitHub
commit ecb43a9589

View file

@ -392,7 +392,6 @@ void Agent::processAgentAvatarAndAudio(float deltaTime) {
const int16_t* nextSoundOutput = NULL;
if (_avatarSound) {
const QByteArray& soundByteArray = _avatarSound->getByteArray();
nextSoundOutput = reinterpret_cast<const int16_t*>(soundByteArray.data()
+ _numAvatarSoundSentBytes);
@ -442,6 +441,10 @@ void Agent::processAgentAvatarAndAudio(float deltaTime) {
audioPacket->writePrimitive(headOrientation);
} else if (nextSoundOutput) {
// write the codec
QString codecName;
audioPacket->writeString(codecName);
// assume scripted avatar audio is mono and set channel flag to zero
audioPacket->writePrimitive((quint8)0);