mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 04:12:46 +02:00
suppress overflown AudioRingBuffer debug
This commit is contained in:
parent
588a5da3ca
commit
5ab59fe770
1 changed files with 5 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
|
||||||
#include <udt/PacketHeaders.h>
|
#include <udt/PacketHeaders.h>
|
||||||
|
#include <LogHandler.h>
|
||||||
|
|
||||||
#include "AudioLogging.h"
|
#include "AudioLogging.h"
|
||||||
|
|
||||||
|
@ -129,7 +130,10 @@ int AudioRingBuffer::writeData(const char* data, int maxSize) {
|
||||||
int samplesToDelete = samplesToCopy - samplesRoomFor;
|
int samplesToDelete = samplesToCopy - samplesRoomFor;
|
||||||
_nextOutput = shiftedPositionAccomodatingWrap(_nextOutput, samplesToDelete);
|
_nextOutput = shiftedPositionAccomodatingWrap(_nextOutput, samplesToDelete);
|
||||||
_overflowCount++;
|
_overflowCount++;
|
||||||
qCDebug(audio) << "Overflowed ring buffer! Overwriting old data";
|
|
||||||
|
const QString RING_BUFFER_OVERFLOW_DEBUG { "AudioRingBuffer::writeData has overflown the buffer. Overwriting old data." };
|
||||||
|
static QString repeatedMessage = LogHandler::getInstance().addRepeatedMessageRegex(RING_BUFFER_OVERFLOW_DEBUG);
|
||||||
|
qCDebug(audio) << qPrintable(RING_BUFFER_OVERFLOW_DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_endOfLastWrite + samplesToCopy <= _buffer + _bufferLength) {
|
if (_endOfLastWrite + samplesToCopy <= _buffer + _bufferLength) {
|
||||||
|
|
Loading…
Reference in a new issue