mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-16 14:33:15 +02:00
more test code (10% drop both directions)
This commit is contained in:
parent
a31d53544b
commit
8565e93ba4
3 changed files with 3 additions and 2 deletions
|
@ -649,6 +649,7 @@ void AudioMixer::run() {
|
|||
}
|
||||
|
||||
// send mixed audio packet
|
||||
if (rand() % 100 < 90)
|
||||
nodeList->writeDatagram(clientMixBuffer, dataAt - clientMixBuffer, node);
|
||||
nodeData->incrementOutgoingMixedAudioSequenceNumber();
|
||||
|
||||
|
|
|
@ -724,6 +724,7 @@ void Audio::handleAudioInput() {
|
|||
}
|
||||
|
||||
int packetBytes = currentPacketPtr - audioDataPacket;
|
||||
if (rand() % 100 < 90)
|
||||
nodeList->writeDatagram(audioDataPacket, packetBytes, audioMixer);
|
||||
_outgoingAvatarAudioSequenceNumber++;
|
||||
|
||||
|
@ -776,8 +777,6 @@ void Audio::addLastFrameRepeatedWithFadeToScope(int samplesPerChannel) {
|
|||
addBufferToScope(_scopeOutputLeft, _scopeOutputOffset, lastFrameData, samplesToWriteThisIteration, 0, STEREO_FACTOR, fade);
|
||||
_scopeOutputOffset = addBufferToScope(_scopeOutputRight, _scopeOutputOffset, lastFrameData, samplesToWriteThisIteration, 1, STEREO_FACTOR, fade);
|
||||
|
||||
printf("scopeOutputOffset %d\n", _scopeOutputOffset);
|
||||
|
||||
samplesRemaining -= samplesToWriteThisIteration;
|
||||
indexOfRepeat++;
|
||||
} while (samplesRemaining > 0);
|
||||
|
|
|
@ -519,6 +519,7 @@ void ScriptEngine::run() {
|
|||
memcpy(audioPacket.data() + numPreSequenceNumberBytes, &sequence, sizeof(quint16));
|
||||
|
||||
// send audio packet
|
||||
if (rand() % 100 < 90)
|
||||
nodeList->writeDatagram(audioPacket, node);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue