UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SoundMix.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6
7#include "AudioDefines.h"
8#include "UObject/Object.h"
10
11#include "SoundMix.generated.h"
12
13class USoundClass;
15
16USTRUCT()
18{
20
21public:
25
27 {
28 }
29
30 // Interpolates between one set of parameters and another and stores result in local copy
32 {
33 return false;
34 }
35
36 // Prints effect parameters
37 virtual void PrintSettings() const
38 {
39 }
40};
41
42USTRUCT()
44{
46
47 /* Start time of effect */
48 double RootTime;
49
51 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "20000.0", UIMin = "0.0", UIMax = "20000.0"))
52 float FrequencyCenter0;
53
55 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "10.0", UIMin = "0.0", UIMax = "10.0"))
56 float Gain0;
57
59 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "2.0", UIMin = "0.0", UIMax = "2.0"))
60 float Bandwidth0;
61
63 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "20000.0", UIMin = "0.0", UIMax = "20000.0"))
64 float FrequencyCenter1;
65
67 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "10.0", UIMin = "0.0", UIMax = "10.0"))
68 float Gain1;
69
71 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "2.0", UIMin = "0.0", UIMax = "2.0"))
72 float Bandwidth1;
73
75 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "20000.0", UIMin = "0.0", UIMax = "20000.0"))
76 float FrequencyCenter2;
77
79 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "10.0", UIMin = "0.0", UIMax = "10.0"))
80 float Gain2;
81
83 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "2.0", UIMin = "0.0", UIMax = "2.0"))
84 float Bandwidth2;
85
87 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "20000.0", UIMin = "0.0", UIMax = "20000.0"))
88 float FrequencyCenter3;
89
91 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "10.0", UIMin = "0.0", UIMax = "10.0"))
92 float Gain3;
93
95 UPROPERTY(EditAnywhere, Category = Band0, meta = (ClampMin = "0.0", ClampMax = "2.0", UIMin = "0.0", UIMax = "2.0"))
96 float Bandwidth3;
97
99 : RootTime(0.0f)
100 , FrequencyCenter0(600.0f)
101 , Gain0(1.0f)
102 , Bandwidth0(1.0f)
103 , FrequencyCenter1(1000.0f)
104 , Gain1(1.0f)
105 , Bandwidth1(1.0f)
106 , FrequencyCenter2(2000.0f)
107 , Gain2(1.0f)
108 , Bandwidth2(1.0f)
109 , FrequencyCenter3(10000.0f)
110 , Gain3(1.0f)
111 , Bandwidth3(1.0f)
112 {}
113
117 bool Interpolate(const FAudioEffectParameters& InStart, const FAudioEffectParameters& InEnd) override;
118
122 void ClampValues();
123
124 virtual void PrintSettings() const override;
125};
126
130USTRUCT(BlueprintType)
132{
134
135 /* The sound class this adjuster affects. */
136 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=SoundClassAdjuster, DisplayName = "Sound Class" )
137 TObjectPtr<USoundClass> SoundClassObject;
138
139 /* A multiplier applied to the volume. */
140 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=SoundClassAdjuster, meta = (ClampMin = "0.0", UIMin = "0.0", UIMax = "4.0"))
141 float VolumeAdjuster;
142
143 /* A multiplier applied to the pitch. */
144 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=SoundClassAdjuster, meta = (ClampMin = "0.0", ClampMax = "8.0", UIMin = "0.0", UIMax = "8.0"))
145 float PitchAdjuster;
146
147 /* Lowpass filter cutoff frequency to apply to sound sources. */
148 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = SoundClassAdjuster, meta = (ClampMin = "0.0", ClampMax = "20000.0", UIMin = "0.0", UIMax = "20000.0"))
149 float LowPassFilterFrequency;
150
151 /* Set to true to apply this adjuster to all children of the sound class. */
152 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=SoundClassAdjuster )
153 uint32 bApplyToChildren:1;
154
155 /* A multiplier applied to VoiceCenterChannelVolume. */
156 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=SoundClassAdjuster, meta = (ClampMin = "0.0", UIMin = "0.0", UIMax = "4.0"))
157 float VoiceCenterChannelVolumeAdjuster;
158
160 : SoundClassObject(NULL)
161 , VolumeAdjuster(1)
162 , PitchAdjuster(1)
163 , LowPassFilterFrequency(MAX_FILTER_FREQUENCY)
164 , bApplyToChildren(false)
165 , VoiceCenterChannelVolumeAdjuster(1)
166 {
167 }
168
169};
170
171UCLASS(BlueprintType, hidecategories=object, MinimalAPI)
173{
175
176
177 UPROPERTY(EditAnywhere, Category=EQ, AssetRegistrySearchable )
178 uint32 bApplyEQ:1;
179
180 UPROPERTY(EditAnywhere, Category=EQ)
181 float EQPriority;
182
183 UPROPERTY(EditAnywhere, Category=EQ)
184 struct FAudioEQEffect EQSettings;
185
186 /* Array of changes to be applied to groups. */
187 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=SoundClasses)
188 TArray<struct FSoundClassAdjuster> SoundClassEffects;
189
190 /* Initial delay in seconds before the mix is applied. */
191 UPROPERTY(EditAnywhere, Category=SoundMix )
192 float InitialDelay;
193
194 /* Time taken in seconds for the mix to fade in. */
195 UPROPERTY(EditAnywhere, Category=SoundMix )
196 float FadeInTime;
197
198 /* Duration of mix, negative means it will be applied until another mix is set. */
199 UPROPERTY(EditAnywhere, Category=SoundMix )
200 float Duration;
201
202 /* Time taken in seconds for the mix to fade out. */
203 UPROPERTY(EditAnywhere, Category=SoundMix )
204 float FadeOutTime;
205
206#if WITH_EDITORONLY_DATA
209 uint32 bChanged:1;
210#endif
211
212#if WITH_EDITOR
214#endif // WITH_EDITOR
215
216protected:
217 //~ Begin UObject Interface.
218 virtual FString GetDesc( void ) override;
219#if WITH_EDITOR
220 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
221#endif // WITH_EDITOR
222 virtual void BeginDestroy() override;
223 //~ End UObject Interface.
224
225#if WITH_EDITOR
227#endif // WITH_EDITOR
228};
229
230
231
#define NULL
Definition oodle2base.h:134
#define MAX_FILTER_FREQUENCY
Definition AudioDefines.h:48
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Array.h:670
Definition Object.h:95
Definition SoundClass.h:209
Definition SoundMix.h:173
@ false
Definition radaudio_common.h:23
Definition SoundMix.h:44
Definition SoundMix.h:18
virtual ~FAudioEffectParameters()
Definition SoundMix.h:26
FAudioEffectParameters()
Definition SoundMix.h:22
virtual bool Interpolate(const FAudioEffectParameters &InStart, const FAudioEffectParameters &InEnd)
Definition SoundMix.h:31
virtual void PrintSettings() const
Definition SoundMix.h:37
Definition UnrealType.h:6865
Definition SoundMix.h:132
Definition ObjectPtr.h:488