mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 21:33:48 +02:00
Merge pull request #12944 from humbletim/fix-pal-adjusted-injector-gain
Support per-avatar gain adjustment on positional audio streams
This commit is contained in:
commit
ae33205d80
1 changed files with 5 additions and 0 deletions
|
@ -376,6 +376,11 @@ void AudioMixerSlave::addStream(AudioMixerClientData& listenerNodeData, const QU
|
|||
return;
|
||||
}
|
||||
|
||||
if (streamToAdd.getType() == PositionalAudioStream::Injector) {
|
||||
// apply per-avatar gain to positional audio injectors, which wouldn't otherwise be affected by PAL sliders
|
||||
hrtf.setGainAdjustment(listenerNodeData.hrtfForStream(sourceNodeID, QUuid()).getGainAdjustment());
|
||||
}
|
||||
|
||||
hrtf.render(_bufferSamples, _mixSamples, HRTF_DATASET_INDEX, azimuth, distance, gain,
|
||||
AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue