mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:56:43 +02:00
removed Audio.cpp initialization list warning; updated Injector removal conditions
This commit is contained in:
parent
3a98ea0d56
commit
90c931ea45
3 changed files with 5 additions and 6 deletions
|
@ -394,7 +394,7 @@ void AudioMixer::prepareMixForListeningNode(Node* node) {
|
||||||
addBufferToMixForListeningNodeWithBuffer(otherNodeBuffer, nodeRingBuffer);
|
addBufferToMixForListeningNodeWithBuffer(otherNodeBuffer, nodeRingBuffer);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//if (debug) {
|
if (debug) {
|
||||||
printf("\nWILL NOT MIX!!!\n");
|
printf("\nWILL NOT MIX!!!\n");
|
||||||
printf("listening node = %s\n", node->getUUID().toString().toLatin1().data());
|
printf("listening node = %s\n", node->getUUID().toString().toLatin1().data());
|
||||||
printf("other node = %s\n", otherNode->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==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 will be added to mix: %d\n", otherNodeBuffer->willBeAddedToMix());
|
||||||
printf("\t\t other trailing loudess: %f\n", otherNodeBuffer->getNextOutputTrailingLoudness());
|
printf("\t\t other trailing loudess: %f\n", otherNodeBuffer->getNextOutputTrailingLoudness());
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,13 +154,12 @@ void AudioMixerClientData::pushBuffersAfterFrameSend() {
|
||||||
// this was a used buffer, push the output pointer forwards
|
// this was a used buffer, push the output pointer forwards
|
||||||
PositionalAudioRingBuffer* audioBuffer = *i;
|
PositionalAudioRingBuffer* audioBuffer = *i;
|
||||||
|
|
||||||
const int INJECTOR_CONSECUTIVE_NOT_MIXED_THRESHOLD = 100;
|
const int INJECTOR_CONSECUTIVE_NOT_MIXED_THRESHOLD = 200;
|
||||||
|
|
||||||
if (audioBuffer->willBeAddedToMix()) {
|
if (audioBuffer->willBeAddedToMix()) {
|
||||||
audioBuffer->shiftReadPosition(audioBuffer->getSamplesPerFrame());
|
audioBuffer->shiftReadPosition(audioBuffer->getSamplesPerFrame());
|
||||||
audioBuffer->setWillBeAddedToMix(false);
|
audioBuffer->setWillBeAddedToMix(false);
|
||||||
} else if (audioBuffer->getType() == PositionalAudioRingBuffer::Injector
|
} else if (audioBuffer->getType() == PositionalAudioRingBuffer::Injector
|
||||||
&& audioBuffer->hasStarted() && audioBuffer->isStarved()
|
|
||||||
&& audioBuffer->getConsecutiveNotMixedCount() > INJECTOR_CONSECUTIVE_NOT_MIXED_THRESHOLD) {
|
&& audioBuffer->getConsecutiveNotMixedCount() > INJECTOR_CONSECUTIVE_NOT_MIXED_THRESHOLD) {
|
||||||
// this is an empty audio buffer that has starved, safe to delete
|
// this is an empty audio buffer that has starved, safe to delete
|
||||||
// also delete its sequence number stats
|
// also delete its sequence number stats
|
||||||
|
|
|
@ -115,9 +115,9 @@ Audio::Audio(int16_t initialJitterBufferSamples, QObject* parent) :
|
||||||
_audioMixerAvatarStreamAudioStats(),
|
_audioMixerAvatarStreamAudioStats(),
|
||||||
_outgoingAvatarAudioSequenceNumber(0),
|
_outgoingAvatarAudioSequenceNumber(0),
|
||||||
_incomingMixedAudioSequenceNumberStats(INCOMING_SEQ_STATS_HISTORY_LENGTH),
|
_incomingMixedAudioSequenceNumberStats(INCOMING_SEQ_STATS_HISTORY_LENGTH),
|
||||||
_interframeTimeGapStats(TIME_GAPS_STATS_INTERVAL_SAMPLES, TIME_GAP_STATS_WINDOW_INTERVALS),
|
|
||||||
_starveCount(0),
|
_starveCount(0),
|
||||||
_consecutiveNotMixedCount(0)
|
_consecutiveNotMixedCount(0),
|
||||||
|
_interframeTimeGapStats(TIME_GAPS_STATS_INTERVAL_SAMPLES, TIME_GAP_STATS_WINDOW_INTERVALS)
|
||||||
{
|
{
|
||||||
// clear the array of locally injected samples
|
// clear the array of locally injected samples
|
||||||
memset(_localProceduralSamples, 0, NETWORK_BUFFER_LENGTH_BYTES_PER_CHANNEL);
|
memset(_localProceduralSamples, 0, NETWORK_BUFFER_LENGTH_BYTES_PER_CHANNEL);
|
||||||
|
|
Loading…
Reference in a new issue