fix audio-mixer muting for injectors

This commit is contained in:
Stephen Birarda 2014-11-13 15:00:40 -08:00
parent de5881818b
commit f27367a0c1

View file

@ -774,7 +774,8 @@ void AudioMixer::run() {
nodeData->checkBuffersBeforeFrameSend();
// if the stream should be muted, send mute packet
if (shouldMute(nodeData->getAvatarAudioStream()->getQuietestFrameLoudness())) {
if (nodeData->getAvatarAudioStream()
&& shouldMute(nodeData->getAvatarAudioStream()->getQuietestFrameLoudness())) {
static const int TIME_BETWEEN_MUTES = 5; // in secs
if (usecTimestampNow() - nodeData->getAvatarAudioStream()->getLastMuted() >
TIME_BETWEEN_MUTES * USECS_PER_SECOND) {