From c3766021d8e542e57e6dc4f68e2b446853d0ef04 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Sat, 12 May 2018 16:52:54 +0200 Subject: [PATCH] Add a log message for audio buffer overflow messages. --- src/common/AudioQueue.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/AudioQueue.cxx b/src/common/AudioQueue.cxx index bc6964fe3..fb80a26ce 100644 --- a/src/common/AudioQueue.cxx +++ b/src/common/AudioQueue.cxx @@ -99,7 +99,10 @@ Int16* AudioQueue::enqueue(Int16* fragment) myFragmentQueue.at(fragmentIndex) = fragment; if (mySize < capacity) mySize++; - else myNextFragment = (myNextFragment + 1) % capacity; + else { + myNextFragment = (myNextFragment + 1) % capacity; + (cerr << "audio buffer overflow\n").flush(); + } return newFragment; }