mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 10:50:18 +02:00
use the attenuation ratio passed by an injected source
This commit is contained in:
parent
58752d7e2d
commit
7715e58b3d
2 changed files with 5 additions and 1 deletions
|
@ -33,7 +33,7 @@ int InjectedAudioRingBuffer::parseData(unsigned char* sourceBuffer, int numBytes
|
|||
currentBuffer += sizeof(_radius);
|
||||
|
||||
unsigned int attenuationByte = *(currentBuffer++);
|
||||
_attenuationRatio = attenuationByte / MAX_INJECTOR_VOLUME;
|
||||
_attenuationRatio = attenuationByte / (float) MAX_INJECTOR_VOLUME;
|
||||
|
||||
currentBuffer += parseAudioSamples(currentBuffer, numBytes - (currentBuffer - sourceBuffer));
|
||||
|
||||
|
|
|
@ -255,6 +255,10 @@ int main(int argc, const char* argv[]) {
|
|||
otherAgentFreeVerb->setEffectMix(effectMix);
|
||||
}
|
||||
|
||||
if (otherAgent->getType() == AGENT_TYPE_AUDIO_INJECTOR) {
|
||||
attenuationCoefficient *= ((InjectedAudioRingBuffer*) otherAgentBuffer)->getAttenuationRatio();
|
||||
}
|
||||
|
||||
int16_t* goodChannel = (bearingRelativeAngleToSource > 0.0f)
|
||||
? clientSamples
|
||||
: clientSamples + BUFFER_LENGTH_SAMPLES_PER_CHANNEL;
|
||||
|
|
Loading…
Reference in a new issue