mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 16:44:04 +02:00
fix some indentation and a conditional
This commit is contained in:
parent
b7099442c1
commit
a99589f6a4
2 changed files with 3 additions and 4 deletions
|
@ -650,7 +650,7 @@ void Audio::handleAudioInput() {
|
|||
_inputFormat, _desiredInputFormat);
|
||||
|
||||
// only impose the noise gate and perform tone injection if we are sending mono audio
|
||||
if (!_isStereoInput && _isNoiseGateEnabled) {
|
||||
if (!_isStereoInput && !_audioSourceInjectEnabled && _isNoiseGateEnabled) {
|
||||
_inputGate.gateSamples(networkAudioSamples, numNetworkSamples);
|
||||
|
||||
// if we performed the noise gate we can get values from it instead of enumerating the samples again
|
||||
|
@ -671,12 +671,13 @@ void Audio::handleAudioInput() {
|
|||
}
|
||||
}
|
||||
|
||||
_lastInputLoudness = fabs(loudness / numNetworkSamples);
|
||||
_lastInputLoudness = fabs(loudness / numNetworkSamples);
|
||||
}
|
||||
|
||||
} else {
|
||||
// our input loudness is 0, since we're muted
|
||||
_lastInputLoudness = 0;
|
||||
_timeSinceLastClip = 0.0f;
|
||||
}
|
||||
|
||||
emit inputReceived(QByteArray(reinterpret_cast<const char*>(networkAudioSamples),
|
||||
|
|
|
@ -62,9 +62,7 @@ void AudioNoiseGate::gateSamples(int16_t* samples, int numSamples) {
|
|||
const int NOISE_GATE_FRAMES_TO_AVERAGE = 5;
|
||||
const float DC_OFFSET_AVERAGING = 0.99f;
|
||||
|
||||
//
|
||||
// Check clipping, adjust DC offset, and check if should open noise gate
|
||||
//
|
||||
float measuredDcOffset = 0.0f;
|
||||
_didClipInLastFrame = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue