From 55954899e61e8114b630d4aef8b8c698c4cd0c28 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 28 May 2013 16:20:23 -0700 Subject: [PATCH] fix silent audio on client --- interface/src/Audio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 9870f31b29..2926aa9a73 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -116,7 +116,7 @@ int audioCallback (const void* inputBuffer, printLog("got output\n"); } - if (inputLeft != NULL) { + if (inputLeft) { // Measure the loudness of the signal from the microphone and store in audio object float loudness = 0; @@ -457,7 +457,7 @@ void Audio::addReceivedAudioToBuffer(unsigned char* receivedData, int receivedBy gettimeofday(&_firstPlaybackTime, NULL); } - _ringBuffer.parseData((unsigned char *)receivedData, PACKET_LENGTH_BYTES); + _ringBuffer.parseData((unsigned char *)receivedData, PACKET_LENGTH_BYTES + sizeof(PACKET_HEADER)); _lastReceiveTime = currentReceiveTime; }