From a0c5dcb3ca9e685a039a34b5be4472271aedc40b Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 1 Apr 2013 13:03:46 -0700 Subject: [PATCH] correct number of leading bytes for addition of attenuation byte --- interface/src/Audio.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 65c57296c5..ce45670c45 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -144,9 +144,10 @@ int audioCallback (const void *inputBuffer, audioMixerSocket.sin_addr.s_addr = data->mixerAddress; audioMixerSocket.sin_port = data->mixerPort; - int leadingBytes = 1 + (sizeof(float) * 4); + int leadingBytes = 2 + (sizeof(float) * 4); - // we need the amount of bytes in the buffer + 1 for type + 12 for 3 floats for position + // we need the amount of bytes in the buffer + 1 for type + // + 12 for 3 floats for position + float for bearing + 1 attenuation byte unsigned char dataPacket[BUFFER_LENGTH_BYTES + leadingBytes]; dataPacket[0] = 'I';