mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 22:36:39 +02:00
removed more more unnecessary changes
This commit is contained in:
parent
7dd7422cbf
commit
9b8f8dbf70
3 changed files with 4 additions and 4 deletions
|
@ -23,4 +23,4 @@ public:
|
||||||
float _avgJitterBufferFrames;
|
float _avgJitterBufferFrames;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_AudioStreamStats_h
|
#endif // hifi_AudioStreamStats_h
|
||||||
|
|
|
@ -203,6 +203,7 @@ bool PositionalAudioRingBuffer::shouldBeAddedToMix() {
|
||||||
if (!isNotStarvedOrHasMinimumSamples(samplesPerFrame + desiredJitterBufferSamples)) {
|
if (!isNotStarvedOrHasMinimumSamples(samplesPerFrame + desiredJitterBufferSamples)) {
|
||||||
// if the buffer was starved, allow it to accrue at least the desired number of
|
// if the buffer was starved, allow it to accrue at least the desired number of
|
||||||
// jitter buffer frames before we start taking frames from it for mixing
|
// jitter buffer frames before we start taking frames from it for mixing
|
||||||
|
|
||||||
if (_shouldOutputStarveDebug) {
|
if (_shouldOutputStarveDebug) {
|
||||||
_shouldOutputStarveDebug = false;
|
_shouldOutputStarveDebug = false;
|
||||||
}
|
}
|
||||||
|
@ -211,7 +212,7 @@ bool PositionalAudioRingBuffer::shouldBeAddedToMix() {
|
||||||
} else if (samplesAvailable() < samplesPerFrame) {
|
} else if (samplesAvailable() < samplesPerFrame) {
|
||||||
// if the buffer doesn't have a full frame of samples to take for mixing, it is starved
|
// if the buffer doesn't have a full frame of samples to take for mixing, it is starved
|
||||||
_isStarved = true;
|
_isStarved = true;
|
||||||
|
|
||||||
// set to 0 to indicate the jitter buffer is starved
|
// set to 0 to indicate the jitter buffer is starved
|
||||||
_currentJitterBufferFrames = 0;
|
_currentJitterBufferFrames = 0;
|
||||||
|
|
||||||
|
@ -252,7 +253,7 @@ void PositionalAudioRingBuffer::updateDesiredJitterBufferFrames() {
|
||||||
_desiredJitterBufferFrames = 1; // HACK to see if this fixes the audio silence
|
_desiredJitterBufferFrames = 1; // HACK to see if this fixes the audio silence
|
||||||
} else {
|
} else {
|
||||||
const float USECS_PER_FRAME = NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL * USECS_PER_SECOND / (float)SAMPLE_RATE;
|
const float USECS_PER_FRAME = NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL * USECS_PER_SECOND / (float)SAMPLE_RATE;
|
||||||
|
|
||||||
_desiredJitterBufferFrames = ceilf((float)_interframeTimeGapStats.getWindowMaxGap() / USECS_PER_FRAME);
|
_desiredJitterBufferFrames = ceilf((float)_interframeTimeGapStats.getWindowMaxGap() / USECS_PER_FRAME);
|
||||||
if (_desiredJitterBufferFrames < 1) {
|
if (_desiredJitterBufferFrames < 1) {
|
||||||
_desiredJitterBufferFrames = 1;
|
_desiredJitterBufferFrames = 1;
|
||||||
|
|
|
@ -78,7 +78,6 @@ public:
|
||||||
int getSamplesPerFrame() const { return _isStereo ? NETWORK_BUFFER_LENGTH_SAMPLES_STEREO : NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL; }
|
int getSamplesPerFrame() const { return _isStereo ? NETWORK_BUFFER_LENGTH_SAMPLES_STEREO : NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL; }
|
||||||
|
|
||||||
int getCalculatedDesiredJitterBufferFrames() const; /// returns what we would calculate our desired as if asked
|
int getCalculatedDesiredJitterBufferFrames() const; /// returns what we would calculate our desired as if asked
|
||||||
|
|
||||||
int getDesiredJitterBufferFrames() const { return _desiredJitterBufferFrames; }
|
int getDesiredJitterBufferFrames() const { return _desiredJitterBufferFrames; }
|
||||||
int getCurrentJitterBufferFrames() const { return _currentJitterBufferFrames; }
|
int getCurrentJitterBufferFrames() const { return _currentJitterBufferFrames; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue