diff --git a/interface/src/scripting/Audio.cpp b/interface/src/scripting/Audio.cpp index b406c097e7..cb8b211352 100644 --- a/interface/src/scripting/Audio.cpp +++ b/interface/src/scripting/Audio.cpp @@ -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); } } diff --git a/libraries/audio-client/src/AudioClient.h b/libraries/audio-client/src/AudioClient.h index 00dd7ae299..db70e2f7b3 100644 --- a/libraries/audio-client/src/AudioClient.h +++ b/libraries/audio-client/src/AudioClient.h @@ -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();