From 779e7631a1cacfa347a72acbb0e1d39264246473 Mon Sep 17 00:00:00 2001 From: wangyix Date: Tue, 5 Aug 2014 10:27:16 -0700 Subject: [PATCH] magic number 100 changed in Audio.cpp --- interface/src/Audio.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index ddd2cf799a..a4ba64824b 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -54,6 +54,8 @@ static const int APPROXIMATELY_30_SECONDS_OF_AUDIO_PACKETS = (int)(30.0f * 1000. // Mute icon configration static const int MUTE_ICON_SIZE = 24; +static const int RECEIVED_AUDIO_STREAM_CAPACITY_FRAMES = 100; + Audio::Audio(QObject* parent) : AbstractAudioInterface(parent), @@ -70,13 +72,8 @@ Audio::Audio(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), - _receivedAudioStream(0, 100, true, 0, 0, true), + _receivedAudioStream(0, RECEIVED_AUDIO_STREAM_CAPACITY_FRAMES, true, 0, 0, true), _isStereoInput(false), _averagedLatency(0.0), _lastInputLoudness(0),