Merge pull request #14577 from davidkelly/dk/20032

Agent needs to be sure audio is ready before trying to use it
This commit is contained in:
Antonina Savinova 2018-12-17 10:32:42 -08:00 committed by GitHub
commit 40a3f76784
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -755,7 +755,7 @@ void Agent::processAgentAvatarAudio() {
int16_t numAvailableSamples = AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL;
const int16_t* nextSoundOutput = NULL;
if (_avatarSound) {
if (_avatarSound && _avatarSound->isReady()) {
auto audioData = _avatarSound->getAudioData();
nextSoundOutput = reinterpret_cast<const int16_t*>(audioData->rawData()
+ _numAvatarSoundSentBytes);