mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 20:06:02 +02:00
correct number of leading bytes for addition of attenuation byte
This commit is contained in:
parent
124fecf8c9
commit
a0c5dcb3ca
1 changed files with 3 additions and 2 deletions
|
@ -144,9 +144,10 @@ int audioCallback (const void *inputBuffer,
|
||||||
audioMixerSocket.sin_addr.s_addr = data->mixerAddress;
|
audioMixerSocket.sin_addr.s_addr = data->mixerAddress;
|
||||||
audioMixerSocket.sin_port = data->mixerPort;
|
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];
|
unsigned char dataPacket[BUFFER_LENGTH_BYTES + leadingBytes];
|
||||||
|
|
||||||
dataPacket[0] = 'I';
|
dataPacket[0] = 'I';
|
||||||
|
|
Loading…
Reference in a new issue