mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:38:02 +02:00
fix sequence number packing for audio injector
This commit is contained in:
parent
b60e358a68
commit
c5047ec76d
1 changed files with 5 additions and 3 deletions
|
@ -215,6 +215,11 @@ void AudioInjector::injectToMixer() {
|
|||
}
|
||||
_loudness /= (float)(bytesToCopy / sizeof(int16_t));
|
||||
|
||||
audioPacket->seek(0);
|
||||
|
||||
// pack the sequence number
|
||||
audioPacket->writePrimitive(outgoingInjectedAudioSequenceNumber);
|
||||
|
||||
audioPacket->seek(positionOptionOffset);
|
||||
audioPacket->writePrimitive(_options.position);
|
||||
audioPacket->writePrimitive(_options.orientation);
|
||||
|
@ -225,9 +230,6 @@ void AudioInjector::injectToMixer() {
|
|||
|
||||
audioPacket->seek(audioDataOffset);
|
||||
|
||||
// pack the sequence number
|
||||
audioPacket->writePrimitive(outgoingInjectedAudioSequenceNumber);
|
||||
|
||||
// copy the next NETWORK_BUFFER_LENGTH_BYTES_PER_CHANNEL bytes to the packet
|
||||
audioPacket->write(_audioData.data() + _currentSendPosition, bytesToCopy);
|
||||
|
||||
|
|
Loading…
Reference in a new issue