mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 05:23:33 +02:00
removed debug prints
This commit is contained in:
parent
9ceac2c631
commit
4587828a3a
7 changed files with 6 additions and 23 deletions
|
@ -155,7 +155,6 @@ void Agent::readPendingDatagrams() {
|
|||
const char* sequenceAt = receivedPacket.constData() + numBytesPacketHeader;
|
||||
quint16 sequence = *(reinterpret_cast<const quint16*>(sequenceAt));
|
||||
_incomingMixedAudioSequenceNumberStats.sequenceNumberReceived(sequence, senderUUID);
|
||||
printf("mixed audio received %d\n", sequence);
|
||||
|
||||
// parse the data and grab the average loudness
|
||||
_receivedAudioBuffer.parseData(receivedPacket);
|
||||
|
|
|
@ -457,7 +457,6 @@ void AudioMixer::sendStatsPacket() {
|
|||
|
||||
// if we're too large, send the packet
|
||||
if (sizeOfStats > TOO_BIG_FOR_MTU) {
|
||||
printf("sending stats to domain server: size: %d\n", sizeOfStats);
|
||||
nodeList->sendStatsToDomainServer(statsObject2);
|
||||
sizeOfStats = 0;
|
||||
statsObject2 = QJsonObject(); // clear it
|
||||
|
@ -466,7 +465,6 @@ printf("sending stats to domain server: size: %d\n", sizeOfStats);
|
|||
}
|
||||
|
||||
if (somethingToSend) {
|
||||
printf("sending stats to domain server: size: %d\n", sizeOfStats);
|
||||
nodeList->sendStatsToDomainServer(statsObject2);
|
||||
}
|
||||
}
|
||||
|
@ -624,8 +622,7 @@ void AudioMixer::run() {
|
|||
|
||||
// send mixed audio packet
|
||||
nodeList->writeDatagram(clientMixBuffer, dataAt - clientMixBuffer, node);
|
||||
printf("mixed audio sent %d\n", sequence);
|
||||
nodeData->incrementOutgoingSequenceNumber();
|
||||
nodeData->incrementOutgoingMixedAudioSequenceNumber();
|
||||
|
||||
// send an audio stream stats packet if it's time
|
||||
if (sendAudioStreamStats) {
|
||||
|
|
|
@ -58,7 +58,6 @@ int AudioMixerClientData::parseData(const QByteArray& packet) {
|
|||
|| packetType == PacketTypeSilentAudioFrame) {
|
||||
|
||||
_incomingAvatarAudioSequenceNumberStats.sequenceNumberReceived(sequence);
|
||||
printf("avatar audio received %d\n", sequence);
|
||||
|
||||
// grab the AvatarAudioRingBuffer from the vector (or create it if it doesn't exist)
|
||||
AvatarAudioRingBuffer* avatarRingBuffer = getAvatarAudioRingBuffer();
|
||||
|
@ -90,7 +89,6 @@ printf("avatar audio received %d\n", sequence);
|
|||
QUuid streamIdentifier = QUuid::fromRfc4122(packet.mid(numBytesForPacketHeader(packet) + sizeof(quint16), NUM_BYTES_RFC4122_UUID));
|
||||
|
||||
_incomingInjectedAudioSequenceNumberStatsMap[streamIdentifier].sequenceNumberReceived(sequence);
|
||||
printf("injected stream %s received seq %d\n", streamIdentifier.toString().toLatin1().data(), sequence);
|
||||
|
||||
InjectedAudioRingBuffer* matchingInjectedRingBuffer = NULL;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
|
||||
QString getJitterBufferStatsString() const;
|
||||
|
||||
void incrementOutgoingSequenceNumber() { _outgoingMixedAudioSequenceNumber++; }
|
||||
void incrementOutgoingMixedAudioSequenceNumber() { _outgoingMixedAudioSequenceNumber++; }
|
||||
|
||||
quint16 getOutgoingSequenceNumber() const { return _outgoingMixedAudioSequenceNumber; }
|
||||
//const SequenceNumberStats& getIncomingSequenceNumberStats() const { return _incomingSequenceNumberStats; }
|
||||
|
|
|
@ -672,7 +672,6 @@ void Audio::handleAudioInput() {
|
|||
currentPacketPtr += sizeof(headOrientation);
|
||||
|
||||
nodeList->writeDatagram(audioDataPacket, numAudioBytes + leadingBytes, audioMixer);
|
||||
//printf("avatar audio sent %d\n", _outgoingAvatarAudioSequenceNumber);
|
||||
_outgoingAvatarAudioSequenceNumber++;
|
||||
|
||||
Application::getInstance()->getBandwidthMeter()->outputStream(BandwidthMeter::AUDIO)
|
||||
|
@ -836,7 +835,6 @@ void Audio::processReceivedAudio(const QByteArray& audioByteArray) {
|
|||
const char* sequenceAt = audioByteArray.constData() + numBytesPacketHeader;
|
||||
quint16 sequence = *((quint16*)sequenceAt);
|
||||
_incomingMixedAudioSequenceNumberStats.sequenceNumberReceived(sequence, senderUUID);
|
||||
printf("\nmixed audio received %d\n", sequence);
|
||||
|
||||
// parse audio data
|
||||
_ringBuffer.parseData(audioByteArray);
|
||||
|
@ -844,16 +842,12 @@ printf("\nmixed audio received %d\n", sequence);
|
|||
float networkOutputToOutputRatio = (_desiredOutputFormat.sampleRate() / (float) _outputFormat.sampleRate())
|
||||
* (_desiredOutputFormat.channelCount() / (float) _outputFormat.channelCount());
|
||||
|
||||
printf("parse data: ring buffer now has %d samples\n", _ringBuffer.samplesAvailable());
|
||||
|
||||
if (!_ringBuffer.isStarved() && _audioOutput && _audioOutput->bytesFree() == _audioOutput->bufferSize()) {
|
||||
// we don't have any audio data left in the output buffer
|
||||
// we just starved
|
||||
//qDebug() << "Audio output just starved.";
|
||||
_ringBuffer.setIsStarved(true);
|
||||
_numFramesDisplayStarve = 10;
|
||||
|
||||
printf("ring buffer just starved!\n");
|
||||
}
|
||||
|
||||
// if there is anything in the ring buffer, decide what to do
|
||||
|
@ -872,9 +866,6 @@ printf("ring buffer just starved!\n");
|
|||
if (!_ringBuffer.isNotStarvedOrHasMinimumSamples(numSamplesNeededToStartPlayback)) {
|
||||
// We are still waiting for enough samples to begin playback
|
||||
// qDebug() << numNetworkOutputSamples << " samples so far, waiting for " << numSamplesNeededToStartPlayback;
|
||||
|
||||
printf("MIX DELAYED: waiting for ring buffer to refill to %d samples after starve\n", numSamplesNeededToStartPlayback);
|
||||
|
||||
} else {
|
||||
// We are either already playing back, or we have enough audio to start playing back.
|
||||
//qDebug() << "pushing " << numNetworkOutputSamples;
|
||||
|
@ -887,7 +878,6 @@ printf("MIX DELAYED: waiting for ring buffer to refill to %d samples after starv
|
|||
buffer.resize(numNetworkOutputSamples * sizeof(int16_t));
|
||||
|
||||
_ringBuffer.readSamples((int16_t*)buffer.data(), numNetworkOutputSamples);
|
||||
printf("mixed. %d samples remaining\n", _ringBuffer.samplesAvailable());
|
||||
|
||||
// Accumulate direct transmission of audio from sender to receiver
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::AudioSpatialProcessingIncludeOriginal)) {
|
||||
|
@ -908,7 +898,6 @@ printf("mixed. %d samples remaining\n", _ringBuffer.samplesAvailable());
|
|||
// copy the samples we'll resample from the ring buffer - this also
|
||||
// pushes the read pointer of the ring buffer forwards
|
||||
_ringBuffer.readSamples(ringBufferSamples, numNetworkOutputSamples);
|
||||
printf("mixed. %d samples remaining\n", _ringBuffer.samplesAvailable());
|
||||
}
|
||||
|
||||
// copy the packet from the RB to the output
|
||||
|
|
|
@ -501,9 +501,9 @@ void ScriptEngine::run() {
|
|||
// only send to nodes of type AudioMixer
|
||||
if (node->getType() == NodeType::AudioMixer) {
|
||||
// pack sequence number
|
||||
quint16 sequence = _outgoingInjectedAudioSequenceNumbers[node->getUUID()]++;
|
||||
quint16 sequence = _outgoingScriptAudioSequenceNumbers[node->getUUID()]++;
|
||||
memcpy(sequenceAt, &sequence, sizeof(quint16));
|
||||
printf("script engine audio sent %d\n", sequence);
|
||||
|
||||
// send audio packet
|
||||
nodeList->writeDatagram(audioPacket, audioPacketSize, node);
|
||||
}
|
||||
|
@ -683,5 +683,5 @@ void ScriptEngine::include(const QString& includeFile) {
|
|||
}
|
||||
|
||||
void ScriptEngine::nodeKilled(SharedNodePointer node) {
|
||||
_outgoingInjectedAudioSequenceNumbers.remove(node->getUUID());
|
||||
_outgoingScriptAudioSequenceNumbers.remove(node->getUUID());
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ private:
|
|||
ScriptUUID _uuidLibrary;
|
||||
AnimationCache _animationCache;
|
||||
|
||||
QHash<QUuid, quint16> _outgoingInjectedAudioSequenceNumbers;
|
||||
QHash<QUuid, quint16> _outgoingScriptAudioSequenceNumbers;
|
||||
};
|
||||
|
||||
#endif // hifi_ScriptEngine_h
|
||||
|
|
Loading…
Reference in a new issue