While PTT is active, duck the audio output by 20dB to reduce echo

This commit is contained in:
Ken Cooke 2019-05-09 12:56:07 -07:00
parent 85f425a93b
commit 1b733d3fb3
2 changed files with 4 additions and 0 deletions

View file

@ -366,8 +366,10 @@ void Audio::onContextChanged() {
void Audio::handlePushedToTalk(bool enabled) {
if (getPTT()) {
if (enabled) {
DependencyManager::get<AudioClient>()->setOutputGain(0.1f); // duck the output by 20dB
setMuted(false);
} else {
DependencyManager::get<AudioClient>()->setOutputGain(1.0f);
setMuted(true);
}
}

View file

@ -241,8 +241,10 @@ public slots:
void setInputVolume(float volume, bool emitSignal = true);
void setReverb(bool reverb);
void setReverbOptions(const AudioEffectOptions* options);
void setLocalInjectorGain(float gain) { _localInjectorGain = gain; };
void setSystemInjectorGain(float gain) { _systemInjectorGain = gain; };
void setOutputGain(float gain) { _outputGain = gain; };
void outputNotify();