mirror of
https://github.com/lubosz/overte.git
synced 2025-04-14 03:06:20 +02:00
make positional streams honor user-specified gain overrides
This commit is contained in:
parent
0a1f07755e
commit
238f59f229
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
|
||||
gain *= 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