diff --git a/assignment-client/src/audio/AudioMixer.cpp b/assignment-client/src/audio/AudioMixer.cpp index c856969de1..6df23ca32f 100644 --- a/assignment-client/src/audio/AudioMixer.cpp +++ b/assignment-client/src/audio/AudioMixer.cpp @@ -394,7 +394,7 @@ void AudioMixer::prepareMixForListeningNode(Node* node) { addBufferToMixForListeningNodeWithBuffer(otherNodeBuffer, nodeRingBuffer); } else { - //if (debug) { + if (debug) { printf("\nWILL NOT MIX!!!\n"); printf("listening node = %s\n", node->getUUID().toString().toLatin1().data()); printf("other node = %s\n", otherNode->getUUID().toString().toLatin1().data()); @@ -409,7 +409,7 @@ void AudioMixer::prepareMixForListeningNode(Node* node) { printf("\t\t other==listening || shouldLoopBack: %d\n", (*otherNode != *node || otherNodeBuffer->shouldLoopbackForNode())); printf("\t\t other will be added to mix: %d\n", otherNodeBuffer->willBeAddedToMix()); printf("\t\t other trailing loudess: %f\n", otherNodeBuffer->getNextOutputTrailingLoudness()); - //} + } } } } diff --git a/assignment-client/src/audio/AudioMixerClientData.cpp b/assignment-client/src/audio/AudioMixerClientData.cpp index 94bbdc6a6b..b6e9f8883e 100644 --- a/assignment-client/src/audio/AudioMixerClientData.cpp +++ b/assignment-client/src/audio/AudioMixerClientData.cpp @@ -154,13 +154,12 @@ void AudioMixerClientData::pushBuffersAfterFrameSend() { // this was a used buffer, push the output pointer forwards PositionalAudioRingBuffer* audioBuffer = *i; - const int INJECTOR_CONSECUTIVE_NOT_MIXED_THRESHOLD = 100; + const int INJECTOR_CONSECUTIVE_NOT_MIXED_THRESHOLD = 200; if (audioBuffer->willBeAddedToMix()) { audioBuffer->shiftReadPosition(audioBuffer->getSamplesPerFrame()); audioBuffer->setWillBeAddedToMix(false); } else if (audioBuffer->getType() == PositionalAudioRingBuffer::Injector - && audioBuffer->hasStarted() && audioBuffer->isStarved() && audioBuffer->getConsecutiveNotMixedCount() > INJECTOR_CONSECUTIVE_NOT_MIXED_THRESHOLD) { // this is an empty audio buffer that has starved, safe to delete // also delete its sequence number stats diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 3689ff0143..bc2da96f6e 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -115,9 +115,9 @@ Audio::Audio(int16_t initialJitterBufferSamples, QObject* parent) : _audioMixerAvatarStreamAudioStats(), _outgoingAvatarAudioSequenceNumber(0), _incomingMixedAudioSequenceNumberStats(INCOMING_SEQ_STATS_HISTORY_LENGTH), - _interframeTimeGapStats(TIME_GAPS_STATS_INTERVAL_SAMPLES, TIME_GAP_STATS_WINDOW_INTERVALS), _starveCount(0), - _consecutiveNotMixedCount(0) + _consecutiveNotMixedCount(0), + _interframeTimeGapStats(TIME_GAPS_STATS_INTERVAL_SAMPLES, TIME_GAP_STATS_WINDOW_INTERVALS) { // clear the array of locally injected samples memset(_localProceduralSamples, 0, NETWORK_BUFFER_LENGTH_BYTES_PER_CHANNEL);