From 4976868f6c11ba767b7022e65b1e691655f3fb8a Mon Sep 17 00:00:00 2001 From: rob gay Date: Thu, 23 Apr 2020 11:14:08 -0400 Subject: [PATCH] - Edigrate Aaron's fix for dynamics processor. - Set bExternalSubmix to whether or not an external input is supplied, even when device is not yet fully initialized to avoid potential scenario where a few frames being processed with the input as the key as opposed to nothing (as external input is not yet initialized) - Clear up UX as Key Gain is no longer technically a Key Gain, but rather an External Input Gain #rb aaron.mcleran #rnx #ROBOMERGE-OWNER: rob.gay #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 13007240 via CL 13007259 via CL 13007306 via CL 13007311 #ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288) [CL 13007323 by rob gay in Main branch] --- .../SubmixEffects/AudioMixerSubmixEffectDynamicsProcessor.h | 4 ++-- .../Effects/AudioMixerSubmixEffectDynamicsProcessor.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Engine/Source/Runtime/AudioMixer/Classes/SubmixEffects/AudioMixerSubmixEffectDynamicsProcessor.h b/Engine/Source/Runtime/AudioMixer/Classes/SubmixEffects/AudioMixerSubmixEffectDynamicsProcessor.h index 79dcc685e209..e2db0d3056e9 100644 --- a/Engine/Source/Runtime/AudioMixer/Classes/SubmixEffects/AudioMixerSubmixEffectDynamicsProcessor.h +++ b/Engine/Source/Runtime/AudioMixer/Classes/SubmixEffects/AudioMixerSubmixEffectDynamicsProcessor.h @@ -133,8 +133,8 @@ struct AUDIOMIXER_API FSubmixEffectDynamicsProcessorSettings UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Sidechain, meta = (DisplayName = "Key Audition")) uint8 bKeyAudition : 1; - // Gain to apply to key signal (external signal if supplied or input signal if disabled) - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Sidechain, meta = (DisplayName = "Key Gain (dB)", UIMin = "-60.0", UIMax = "30.0")) + // Gain to apply to key signal if external input is supplied + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Sidechain, meta = (DisplayName = "External Input Gain (dB)", EditCondition = "ExternalSubmix != nullptr", UIMin = "-60.0", UIMax = "30.0")) float KeyGainDb; // The output gain of the dynamics processor diff --git a/Engine/Source/Runtime/AudioMixer/Private/Effects/AudioMixerSubmixEffectDynamicsProcessor.cpp b/Engine/Source/Runtime/AudioMixer/Private/Effects/AudioMixerSubmixEffectDynamicsProcessor.cpp index b87b85eec3cd..062d61e34b9b 100644 --- a/Engine/Source/Runtime/AudioMixer/Private/Effects/AudioMixerSubmixEffectDynamicsProcessor.cpp +++ b/Engine/Source/Runtime/AudioMixer/Private/Effects/AudioMixerSubmixEffectDynamicsProcessor.cpp @@ -210,7 +210,7 @@ void FSubmixEffectDynamicsProcessor::SetExternalSubmix(USoundSubmix* InSoundSubm else { DeviceCreatedHandle = FAudioDeviceManagerDelegates::OnAudioDeviceCreated.AddRaw(this, &FSubmixEffectDynamicsProcessor::OnNewDeviceCreated); - bUseExternalSubmix = false; + bUseExternalSubmix = ExternalSubmix.IsValid(); } }