mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:57:26 +02:00
Modify injected audio stream to send the ignore penumbra option
This commit is contained in:
parent
49526e69f8
commit
4b73a5ac35
3 changed files with 7 additions and 1 deletions
|
@ -100,6 +100,8 @@ void AudioInjector::injectAudio() {
|
||||||
quint8 volume = MAX_INJECTOR_VOLUME * _options.getVolume();
|
quint8 volume = MAX_INJECTOR_VOLUME * _options.getVolume();
|
||||||
packetStream << volume;
|
packetStream << volume;
|
||||||
|
|
||||||
|
packetStream << _options.ignorePenumbra();
|
||||||
|
|
||||||
QElapsedTimer timer;
|
QElapsedTimer timer;
|
||||||
timer.start();
|
timer.start();
|
||||||
int nextFrame = 0;
|
int nextFrame = 0;
|
||||||
|
|
|
@ -63,7 +63,9 @@ int InjectedAudioStream::parseStreamProperties(PacketType type,
|
||||||
quint8 attenuationByte = 0;
|
quint8 attenuationByte = 0;
|
||||||
packetStream >> attenuationByte;
|
packetStream >> attenuationByte;
|
||||||
_attenuationRatio = attenuationByte / (float)MAX_INJECTOR_VOLUME;
|
_attenuationRatio = attenuationByte / (float)MAX_INJECTOR_VOLUME;
|
||||||
|
|
||||||
|
packetStream >> _ignorePenumbra;
|
||||||
|
|
||||||
int numAudioBytes = packetAfterSeqNum.size() - packetStream.device()->pos();
|
int numAudioBytes = packetAfterSeqNum.size() - packetStream.device()->pos();
|
||||||
numAudioSamples = numAudioBytes / sizeof(int16_t);
|
numAudioSamples = numAudioBytes / sizeof(int16_t);
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,8 @@ PacketVersion versionForPacketType(PacketType type) {
|
||||||
return 4;
|
return 4;
|
||||||
case PacketTypeMixedAudio:
|
case PacketTypeMixedAudio:
|
||||||
return 1;
|
return 1;
|
||||||
|
case PacketTypeInjectAudio:
|
||||||
|
return 1;
|
||||||
case PacketTypeAvatarData:
|
case PacketTypeAvatarData:
|
||||||
return 3;
|
return 3;
|
||||||
case PacketTypeAvatarIdentity:
|
case PacketTypeAvatarIdentity:
|
||||||
|
|
Loading…
Reference in a new issue