UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IAudioParameterInterfaceRegistry.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "AudioParameter.h"
6#include "Containers/Array.h"
7#include "Containers/Map.h"
8#include "Containers/Set.h"
9#include "HAL/Platform.h"
12#include "Templates/Function.h"
14#include "Templates/UniquePtr.h"
15#include "UObject/Class.h"
16#include "UObject/NameTypes.h"
17
18
19namespace Audio
20{
21 // Forward Declarations
22 class IAudioParameterInterfaceRegistry;
23
24 // Interface for parameterizing data provided to or coming from an executable audio unit
25 // (ex. Sound like a MetaSoundSource, arbitrary DSP graph like a MetaSoundPatch, etc.).
26 // Can be used generically for processing either logically at a control or Game Thread
27 // tick rate (ex. SoundCues), or by an underlying DSP operation via the Audio Render
28 // Thread or delegated task (ex. MetaSounds, custom SoundGenerator, etc.)
30 {
31 // Version of interface (higher numbers are more recent)
32 struct FVersion
33 {
34 const int32 Major = 1;
35 const int32 Minor = 0;
36 };
37
38 // Input of interface
39 struct FInput
40 {
41 // Name to be displayed in editor or tools
43
44 // Description to be displayed in editor or tools
46
47 // FName describing the type of the data. May be
48 // interpreted solely by a plugin or implementation
49 // (ex. MetaSounds). If blank, type is assumed to be
50 // that described by the InitValue AudioParameter's
51 // corresponding ParamType. If provided, DataType
52 // must be constructible using the InitValue.
54
55 // Initial value of the given parameter
57
58 // Text to display in the editor or tools if the consuming
59 // system of the given input parameter is not implemented (to avoid
60 // passing data using the parameter system when not operated on).
62
63 // Visual sort order of the given input with respect to other inputs either
64 // within the given interface or listed among other unrelated inputs.
66 };
67
68 // Output of interface
69 struct FOutput
70 {
71 // Name to be displayed in editor or tools
73
74 // Description to be displayed in editor or tools
76
77 // FName describing the type of the data. May be
78 // interpreted solely by a plugin or implementation
79 // (ex. MetaSounds). If blank, type is assumed to be
80 // that described by ParamType.
82
83 // Name of output parameter used as a runtime identifier
85
86 // Text to display in the editor or tools if the consuming
87 // system of the given input parameter is not implemented (to avoid
88 // passing data using the parameter system when not operated on).
90
91 // Type of output parameter used as a runtime identifier if unspecified by the DataType.
92 const EAudioParameterType ParamType = EAudioParameterType::None;
93
94 // Visual sort order of the given input with respect to other outputs either
95 // within the given interface or listed among other unrelated outputs.
97 };
98
99 // Read-only variable that cannot be modified by the sound instance,
100 // and maybe shared amongst instances.
102 {
103 // Name to be displayed in editor or tools
105
106 // Description to be displayed in editor or tools
108
109 // FName describing the type of the data. May be
110 // interpreted solely by a plugin or implementation
111 // (ex. MetaSounds). If blank, type is assumed to be
112 // that described by ParamType.
114
115 // Name of variable used as a runtime identifier
117
118 // Type of variable used as a runtime identifier if unspecified by the DataType.
119 const EAudioParameterType ParamType = EAudioParameterType::None;
120 };
121
122 // Options used to restrict a corresponding UClass that interface may be applied to.
124 {
125 // Path to restricted UClass
127
128 // Whether or not the class may be directly modifiable on an asset implementing
129 // the given interface (added, removed, etc.)
130 const bool bIsModifiable = true;
131
132 // Whether or not the interface should be immediately added to the given class
133 // type on creation.
134 const bool bIsDefault = false;
135 };
136
138
139 // Constructor used for parameter interface not limited to any particular UClass types
141
142 UE_DEPRECATED(5.3, "Set UClassOptions to determine what options apply for a given UClass (if any).")
144
145 // Returns name of interface
147
148 // Returns version of interface
150
151 UE_DEPRECATED(5.3, "Use FParameterInterface::FindSupportedUClasses instead")
152 AUDIOEXTENSIONS_API const UClass& GetType() const;
153
155
156 // If specified, options used to restrict a corresponding UClass that interface may be
157 // applied to. If unspecified, interface is assumed to be applicable to any arbitrary UClass.
159
160 // Returns read-only array of inputs
162
163 // Returns read-only array of outputs
165
166 // Returns read-only array of environment variables
168
169 private:
170 FName NamePrivate;
171 FVersion VersionPrivate;
172
173 protected:
178 };
180
181 // Registry of engine-defined audio parameter interfaces, used to parameterize data provided
182 // to or coming from an executable audio unit (ex. Sound like a MetaSoundSource, arbitrary DSP
183 // graph like a MetaSoundPatch, etc.).
185 {
187
188 public:
190
192
193 // Iterate all registered interfaces
195
196 // Execute a given function when an interface is registered
198
199 // Registers an interface
201
202 protected:
205 };
206} // namespace Audio
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
EAudioParameterType
Definition AudioParameter.h:42
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ESPMode
Definition SharedPointerFwd.h:12
Definition IAudioParameterInterfaceRegistry.h:185
TUniqueFunction< void(FParameterInterfacePtr)> RegistrationFunction
Definition IAudioParameterInterfaceRegistry.h:204
virtual void OnRegistration(TUniqueFunction< void(FParameterInterfacePtr)> &&InFunction)=0
virtual void RegisterInterface(FParameterInterfacePtr InInterface)=0
virtual ~IAudioParameterInterfaceRegistry()=default
virtual void IterateInterfaces(TFunction< void(FParameterInterfacePtr)> InFunction) const =0
TSet< FParameterInterfacePtr > Interfaces
Definition IAudioParameterInterfaceRegistry.h:203
Definition NameTypes.h:617
Definition UnrealType.h:3087
Definition Text.h:385
Definition Array.h:670
Definition AndroidPlatformMisc.h:14
Definition SharedPointer.h:692
Definition FunctionFwd.h:19
Definition UniquePtr.h:107
Definition Class.h:3793
NO_LOGGING.
Definition AudioMixerPlatformAndroid.cpp:53
Definition IAudioParameterInterfaceRegistry.h:124
const bool bIsModifiable
Definition IAudioParameterInterfaceRegistry.h:130
const FTopLevelAssetPath ClassPath
Definition IAudioParameterInterfaceRegistry.h:126
const bool bIsDefault
Definition IAudioParameterInterfaceRegistry.h:134
Definition IAudioParameterInterfaceRegistry.h:102
const FName ParamName
Definition IAudioParameterInterfaceRegistry.h:116
const FName DataType
Definition IAudioParameterInterfaceRegistry.h:113
const FText DisplayName
Definition IAudioParameterInterfaceRegistry.h:104
const FText Description
Definition IAudioParameterInterfaceRegistry.h:107
const EAudioParameterType ParamType
Definition IAudioParameterInterfaceRegistry.h:119
Definition IAudioParameterInterfaceRegistry.h:40
const FText Description
Definition IAudioParameterInterfaceRegistry.h:45
const FText DisplayName
Definition IAudioParameterInterfaceRegistry.h:42
const FAudioParameter InitValue
Definition IAudioParameterInterfaceRegistry.h:56
const FName DataType
Definition IAudioParameterInterfaceRegistry.h:53
const FText RequiredText
Definition IAudioParameterInterfaceRegistry.h:61
const int32 SortOrderIndex
Definition IAudioParameterInterfaceRegistry.h:65
Definition IAudioParameterInterfaceRegistry.h:70
const FText DisplayName
Definition IAudioParameterInterfaceRegistry.h:72
const FText Description
Definition IAudioParameterInterfaceRegistry.h:75
const int32 SortOrderIndex
Definition IAudioParameterInterfaceRegistry.h:96
const FName ParamName
Definition IAudioParameterInterfaceRegistry.h:84
const FText RequiredText
Definition IAudioParameterInterfaceRegistry.h:89
const EAudioParameterType ParamType
Definition IAudioParameterInterfaceRegistry.h:92
const FName DataType
Definition IAudioParameterInterfaceRegistry.h:81
Definition IAudioParameterInterfaceRegistry.h:33
const int32 Major
Definition IAudioParameterInterfaceRegistry.h:34
const int32 Minor
Definition IAudioParameterInterfaceRegistry.h:35
Definition IAudioParameterInterfaceRegistry.h:30
TArray< FClassOptions > UClassOptions
Definition IAudioParameterInterfaceRegistry.h:177
TArray< FOutput > Outputs
Definition IAudioParameterInterfaceRegistry.h:175
TArray< FInput > Inputs
Definition IAudioParameterInterfaceRegistry.h:174
AUDIOEXTENSIONS_API TArray< const UClass * > FindSupportedUClasses() const
Definition IAudioParameterInterfaceRegistry.cpp:90
AUDIOEXTENSIONS_API FName GetName() const
Definition IAudioParameterInterfaceRegistry.cpp:55
AUDIOEXTENSIONS_API const TArray< FOutput > & GetOutputs() const
Definition IAudioParameterInterfaceRegistry.cpp:80
AUDIOEXTENSIONS_API const UClass & GetType() const
Definition IAudioParameterInterfaceRegistry.cpp:65
AUDIOEXTENSIONS_API const TArray< FEnvironmentVariable > & GetEnvironment() const
Definition IAudioParameterInterfaceRegistry.cpp:85
AUDIOEXTENSIONS_API const FVersion & GetVersion() const
Definition IAudioParameterInterfaceRegistry.cpp:60
AUDIOEXTENSIONS_API const TArray< FClassOptions > & GetUClassOptions() const
Definition IAudioParameterInterfaceRegistry.cpp:70
TArray< FEnvironmentVariable > Environment
Definition IAudioParameterInterfaceRegistry.h:176
AUDIOEXTENSIONS_API const TArray< FInput > & GetInputs() const
Definition IAudioParameterInterfaceRegistry.cpp:75
Definition AudioParameter.h:93
Definition TopLevelAssetPath.h:38