mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 10:43:45 +02:00
Merge branch 'master' of https://github.com/worklist/hifi into armstrong
This commit is contained in:
commit
eaf6aef1cb
2 changed files with 12 additions and 2 deletions
|
@ -20,7 +20,8 @@ PositionalAudioRingBuffer::PositionalAudioRingBuffer(PositionalAudioRingBuffer::
|
||||||
_position(0.0f, 0.0f, 0.0f),
|
_position(0.0f, 0.0f, 0.0f),
|
||||||
_orientation(0.0f, 0.0f, 0.0f, 0.0f),
|
_orientation(0.0f, 0.0f, 0.0f, 0.0f),
|
||||||
_willBeAddedToMix(false),
|
_willBeAddedToMix(false),
|
||||||
_shouldLoopbackForNode(false)
|
_shouldLoopbackForNode(false),
|
||||||
|
_shouldOutputStarveDebug(true)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -57,11 +58,19 @@ int PositionalAudioRingBuffer::parsePositionalData(unsigned char* sourceBuffer,
|
||||||
|
|
||||||
bool PositionalAudioRingBuffer::shouldBeAddedToMix(int numJitterBufferSamples) {
|
bool PositionalAudioRingBuffer::shouldBeAddedToMix(int numJitterBufferSamples) {
|
||||||
if (!isNotStarvedOrHasMinimumSamples(NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL + numJitterBufferSamples)) {
|
if (!isNotStarvedOrHasMinimumSamples(NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL + numJitterBufferSamples)) {
|
||||||
qDebug() << "Starved and do not have minimum samples to start. Buffer held back.\n";
|
if (_shouldOutputStarveDebug) {
|
||||||
|
qDebug() << "Starved and do not have minimum samples to start. Buffer held back.\n";
|
||||||
|
_shouldOutputStarveDebug = false;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} else if (samplesAvailable() < NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL) {
|
} else if (samplesAvailable() < NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL) {
|
||||||
qDebug() << "Do not have number of samples needed for interval. Buffer starved.\n";
|
qDebug() << "Do not have number of samples needed for interval. Buffer starved.\n";
|
||||||
_isStarved = true;
|
_isStarved = true;
|
||||||
|
|
||||||
|
// reset our _shouldOutputStarveDebug to true so the next is printed
|
||||||
|
_shouldOutputStarveDebug = true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// good buffer, add this to the mix
|
// good buffer, add this to the mix
|
||||||
|
|
|
@ -49,6 +49,7 @@ protected:
|
||||||
glm::quat _orientation;
|
glm::quat _orientation;
|
||||||
bool _willBeAddedToMix;
|
bool _willBeAddedToMix;
|
||||||
bool _shouldLoopbackForNode;
|
bool _shouldLoopbackForNode;
|
||||||
|
bool _shouldOutputStarveDebug;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* defined(__hifi__PositionalAudioRingBuffer__) */
|
#endif /* defined(__hifi__PositionalAudioRingBuffer__) */
|
||||||
|
|
Loading…
Reference in a new issue