Files
UnrealEngineUWP/Engine/Source/Runtime/AudioExtensions/Private/IAudioParameterInterfaceRegistry.cpp
rob gay d2e6910760 MetaSounds Interfaces Checkpoint 2:
- Version up source archetypes to become two interfaces: channel interfaces (mono/stereo) & base source namespace
- Clean-up Interface panel to support namespacing better
- Fix bugs with assuming interfaces are always and the only base namespace members
- Allow namespacing for any arbitrary interface member
- Add lock icon to clarify what interface members cannot be modified individually (i.e. cannot add, remove, or rename them as they are interface members)
- Organize members alphabetically
#jira UE-135000
#rnx
#rb phil.popp
#preflight 61a7d1079c77d610079303ec

#ROBOMERGE-AUTHOR: rob.gay
#ROBOMERGE-SOURCE: CL 18344347 in //UE5/Release-5.0/... via CL 18344412
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18344446 by rob gay in ue5-release-engine-test branch]
2021-12-01 15:59:03 -05:00

49 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "IAudioParameterInterfaceRegistry.h"
namespace Audio
{
namespace ParameterInterfaceRegistryPrivate
{
class FParameterInterfaceRegistry : public IAudioParameterInterfaceRegistry
{
public:
virtual void IterateInterfaces(TFunction<void(FParameterInterfacePtr)> InFunction) const override
{
for (const FParameterInterfacePtr& InterfacePtr : Interfaces)
{
InFunction(InterfacePtr);
}
}
virtual void RegisterInterface(FParameterInterfacePtr InInterface) override
{
Interfaces.Add(InInterface);
if (RegistrationFunction)
{
RegistrationFunction(InInterface);
}
}
virtual void OnRegistration(TUniqueFunction<void(FParameterInterfacePtr)>&& InFunction) override
{
RegistrationFunction = MoveTemp(InFunction);
}
};
} // namespace ParameterInterfaceRegistryPrivate
TUniquePtr<IAudioParameterInterfaceRegistry> IAudioParameterInterfaceRegistry::Instance;
IAudioParameterInterfaceRegistry& IAudioParameterInterfaceRegistry::Get()
{
using namespace ParameterInterfaceRegistryPrivate;
if (!Instance.IsValid())
{
Instance = MakeUnique<FParameterInterfaceRegistry>();
}
return *Instance;
}
} // namespace Audio