mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 23:26:25 +02:00
Fixed for no/multiple reverb zones
This commit is contained in:
parent
3ba3354e11
commit
9c45055aeb
1 changed files with 9 additions and 4 deletions
|
@ -731,6 +731,7 @@ void AudioMixer::run() {
|
|||
dataAt += sizeof(quint16);
|
||||
|
||||
// Pack stream properties
|
||||
bool inAZone = false;
|
||||
for (int i = 0; i < _zoneReverbSettings.size(); ++i) {
|
||||
AudioMixerClientData* data = static_cast<AudioMixerClientData*>(node->getLinkedData());
|
||||
glm::vec3 streamPosition = data->getAvatarAudioStream()->getPosition();
|
||||
|
@ -745,12 +746,16 @@ void AudioMixer::run() {
|
|||
dataAt += sizeof(float);
|
||||
memcpy(dataAt, &wetLevel, sizeof(float));
|
||||
dataAt += sizeof(float);
|
||||
} else {
|
||||
bool hasReverb = false;
|
||||
memcpy(dataAt, &hasReverb, sizeof(bool));
|
||||
dataAt += sizeof(bool);
|
||||
|
||||
inAZone = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!inAZone) {
|
||||
bool hasReverb = false;
|
||||
memcpy(dataAt, &hasReverb, sizeof(bool));
|
||||
dataAt += sizeof(bool);
|
||||
}
|
||||
|
||||
// pack mixed audio samples
|
||||
memcpy(dataAt, _mixSamples, NETWORK_BUFFER_LENGTH_BYTES_STEREO);
|
||||
|
|
Loading…
Reference in a new issue