mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 22:44:15 +02:00
fix writing to packet in AudioInjector
This commit is contained in:
parent
c162d53908
commit
f3eb6982e6
1 changed files with 4 additions and 4 deletions
|
@ -216,17 +216,17 @@ void AudioInjector::injectToMixer() {
|
|||
_loudness /= (float)(bytesToCopy / sizeof(int16_t));
|
||||
|
||||
audioPacket->seek(positionOptionOffset);
|
||||
audioPacket->write(_options.position);
|
||||
audioPacket->write(_options.orientation);
|
||||
audioPacket->writePrimitive(_options.position);
|
||||
audioPacket->writePrimitive(_options.orientation);
|
||||
|
||||
volume = MAX_INJECTOR_VOLUME * _options.volume;
|
||||
audioPacket->seek(volumeOptionOffset);
|
||||
audioPacket->write(volume);
|
||||
audioPacket->writePrimitive(volume);
|
||||
|
||||
audioPacket->seek(audioDataOffset);
|
||||
|
||||
// pack the sequence number
|
||||
audioPacket->write(outgoingInjectedAudioSequenceNumber);
|
||||
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