mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-04-04 18:48:38 -04:00
Gain control fix for OSX
This commit is contained in:
parent
18ee0ac0fc
commit
f1355b1775
@ -116,7 +116,7 @@ static int audioCallback(void *outputBuffer, void *inputBuffer, unsigned int nBu
|
||||
srcmix->audioQueuePtr = 0;
|
||||
}
|
||||
if (srcmix->currentInput && srcmix->currentInput->data.size()) {
|
||||
float v = srcmix->currentInput->data[srcmix->audioQueuePtr] * src->gain;
|
||||
float v = srcmix->currentInput->data[srcmix->audioQueuePtr] * src->gain * srcmix->gain;
|
||||
out[i * 2] += v;
|
||||
out[i * 2 + 1] += v;
|
||||
}
|
||||
@ -139,7 +139,7 @@ static int audioCallback(void *outputBuffer, void *inputBuffer, unsigned int nBu
|
||||
srcmix->audioQueuePtr = 0;
|
||||
}
|
||||
if (srcmix->currentInput && srcmix->currentInput->data.size()) {
|
||||
out[i] = out[i] + srcmix->currentInput->data[srcmix->audioQueuePtr] * src->gain;
|
||||
out[i] = out[i] + srcmix->currentInput->data[srcmix->audioQueuePtr] * src->gain * srcmix->gain;
|
||||
}
|
||||
srcmix->audioQueuePtr++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user