Modify injected audio stream to send the ignore penumbra option

This commit is contained in:
Atlante45 2014-11-05 16:22:06 +01:00
parent 49526e69f8
commit 4b73a5ac35
3 changed files with 7 additions and 1 deletions

View file

@ -100,6 +100,8 @@ void AudioInjector::injectAudio() {
quint8 volume = MAX_INJECTOR_VOLUME * _options.getVolume();
packetStream << volume;
packetStream << _options.ignorePenumbra();
QElapsedTimer timer;
timer.start();
int nextFrame = 0;

View file

@ -63,7 +63,9 @@ int InjectedAudioStream::parseStreamProperties(PacketType type,
quint8 attenuationByte = 0;
packetStream >> attenuationByte;
_attenuationRatio = attenuationByte / (float)MAX_INJECTOR_VOLUME;
packetStream >> _ignorePenumbra;
int numAudioBytes = packetAfterSeqNum.size() - packetStream.device()->pos();
numAudioSamples = numAudioBytes / sizeof(int16_t);

View file

@ -54,6 +54,8 @@ PacketVersion versionForPacketType(PacketType type) {
return 4;
case PacketTypeMixedAudio:
return 1;
case PacketTypeInjectAudio:
return 1;
case PacketTypeAvatarData:
return 3;
case PacketTypeAvatarIdentity: