mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 11:43:16 +02:00
variable fixes for audio-mixer loopback
This commit is contained in:
parent
82cff262b1
commit
a87e0d7f7f
1 changed files with 4 additions and 2 deletions
|
@ -123,6 +123,8 @@ void *sendBuffer(void *args) {
|
|||
|
||||
float bearingRelativeAngleToSource = 0.f;
|
||||
float attenuationCoefficient = 1.f;
|
||||
int numSamplesDelay = 0;
|
||||
float weakChannelAmplitudeRatio = 1.f;
|
||||
|
||||
if (otherAgent != agent) {
|
||||
float *agentPosition = agentRingBuffer->getPosition();
|
||||
|
@ -189,8 +191,8 @@ void *sendBuffer(void *args) {
|
|||
* offAxisCoefficient;
|
||||
|
||||
float sinRatio = fabsf(sinf(bearingRelativeAngleToSource));
|
||||
int numSamplesDelay = PHASE_DELAY_AT_90 * sinRatio;
|
||||
float weakChannelAmplitudeRatio = 1 - (PHASE_AMPLITUDE_RATIO_AT_90 * sinRatio);
|
||||
numSamplesDelay = PHASE_DELAY_AT_90 * sinRatio;
|
||||
weakChannelAmplitudeRatio = 1 - (PHASE_AMPLITUDE_RATIO_AT_90 * sinRatio);
|
||||
}
|
||||
|
||||
int16_t* goodChannel = bearingRelativeAngleToSource > 0 ? clientMix + BUFFER_LENGTH_SAMPLES_PER_CHANNEL : clientMix;
|
||||
|
|
Loading…
Reference in a new issue