fix silent audio on client

This commit is contained in:
Stephen Birarda 2013-05-28 16:20:23 -07:00
parent ccc04688d2
commit 55954899e6

View file

@ -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;
}