From 7c5a77ddfe5308be352c4a9615d21036d847a6d3 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Mon, 21 Jul 2014 10:29:51 -0700 Subject: [PATCH] revert back the largest capacity of the client ring buffer back to the smaller default value --- interface/src/Audio.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index b728b740b7..3fa1d6a082 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -79,8 +79,14 @@ Audio::Audio(int16_t initialJitterBufferSamples, QObject* parent) : _loopbackOutputDevice(NULL), _proceduralAudioOutput(NULL), _proceduralOutputDevice(NULL), + + // NOTE: Be very careful making changes to the initializers of these ring buffers. There is a known problem with some + // Mac audio devices that slowly introduce additional delay in the audio device because they play out audio slightly + // slower than real time (or at least the desired sample rate). If you increase the size of the ring buffer, then it + // this delay will slowly add up and the longer someone runs, they more delayed their audio will be. _inputRingBuffer(0), - _ringBuffer(NETWORK_BUFFER_LENGTH_SAMPLES_STEREO, false, 100), + _ringBuffer(NETWORK_BUFFER_LENGTH_SAMPLES_STEREO), // DO NOT CHANGE THIS UNLESS YOU SOLVE THE AUDIO DEVICE DRIFT PROBLEM!!! + _isStereoInput(false), _averagedLatency(0.0), _measuredJitter(0),