mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 20:13:40 +02:00
Merge pull request #232 from birarda/master
variable fixes for audio mixer loopback
This commit is contained in:
commit
e69b0c17a3
1 changed files with 4 additions and 2 deletions
|
@ -123,6 +123,8 @@ void *sendBuffer(void *args) {
|
||||||
|
|
||||||
float bearingRelativeAngleToSource = 0.f;
|
float bearingRelativeAngleToSource = 0.f;
|
||||||
float attenuationCoefficient = 1.f;
|
float attenuationCoefficient = 1.f;
|
||||||
|
int numSamplesDelay = 0;
|
||||||
|
float weakChannelAmplitudeRatio = 1.f;
|
||||||
|
|
||||||
if (otherAgent != agent) {
|
if (otherAgent != agent) {
|
||||||
float *agentPosition = agentRingBuffer->getPosition();
|
float *agentPosition = agentRingBuffer->getPosition();
|
||||||
|
@ -189,8 +191,8 @@ void *sendBuffer(void *args) {
|
||||||
* offAxisCoefficient;
|
* offAxisCoefficient;
|
||||||
|
|
||||||
float sinRatio = fabsf(sinf(bearingRelativeAngleToSource));
|
float sinRatio = fabsf(sinf(bearingRelativeAngleToSource));
|
||||||
int numSamplesDelay = PHASE_DELAY_AT_90 * sinRatio;
|
numSamplesDelay = PHASE_DELAY_AT_90 * sinRatio;
|
||||||
float weakChannelAmplitudeRatio = 1 - (PHASE_AMPLITUDE_RATIO_AT_90 * sinRatio);
|
weakChannelAmplitudeRatio = 1 - (PHASE_AMPLITUDE_RATIO_AT_90 * sinRatio);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t* goodChannel = bearingRelativeAngleToSource > 0 ? clientMix + BUFFER_LENGTH_SAMPLES_PER_CHANNEL : clientMix;
|
int16_t* goodChannel = bearingRelativeAngleToSource > 0 ? clientMix + BUFFER_LENGTH_SAMPLES_PER_CHANNEL : clientMix;
|
||||||
|
|
Loading…
Reference in a new issue