From 5f393734e02f8fbffcd873be5f6ef352584af0ca Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 11 Mar 2013 17:12:24 -0700 Subject: [PATCH] print out difference between buffer callbacks on mixer --- mixer/src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mixer/src/main.cpp b/mixer/src/main.cpp index 21143b80f9..3196cded08 100644 --- a/mixer/src/main.cpp +++ b/mixer/src/main.cpp @@ -58,13 +58,17 @@ void *sendBuffer(void *args) { int sentBytes; int nextFrame = 0; - timeval startTime; + timeval startTime, lastSend; gettimeofday(&startTime, NULL); + gettimeofday(&lastSend, NULL); while (true) { sentBytes = 0; + printf("Last send was %f us ago", usecTimestampNow() - usecTimestamp(&lastSend)); + gettimeofday(&lastSend, NULL); + for (int i = 0; i < agentList.getAgents().size(); i++) { AudioRingBuffer *agentBuffer = (AudioRingBuffer *) agentList.getAgents()[i].getLinkedData();