You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- 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]
100 lines
3.0 KiB
C++
100 lines
3.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#include "MetasoundOutputFormatInterfaces.h"
|
|
|
|
#include "IAudioParameterInterfaceRegistry.h"
|
|
#include "MetasoundAudioBuffer.h"
|
|
#include "MetasoundTrigger.h"
|
|
#include "Templates/SharedPointer.h"
|
|
#include "UObject/Class.h"
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "MetasoundFrontend"
|
|
namespace Metasound
|
|
{
|
|
namespace Frontend
|
|
{
|
|
#define AUDIO_PARAMETER_INTERFACE_NAMESPACE "UE.OutputFormat.Mono"
|
|
namespace OutputFormatMonoInterface
|
|
{
|
|
const FMetasoundFrontendVersion& GetVersion()
|
|
{
|
|
static const FMetasoundFrontendVersion Version = { AUDIO_PARAMETER_INTERFACE_NAMESPACE, { 1, 0 } };
|
|
return Version;
|
|
}
|
|
|
|
namespace Outputs
|
|
{
|
|
const FName MonoOut = AUDIO_PARAMETER_INTERFACE_MEMBER_DEFINE("Audio:0");
|
|
}
|
|
|
|
Audio::FParameterInterfacePtr CreateInterface(const UClass& InUClass)
|
|
{
|
|
struct FInterface : public Audio::FParameterInterface
|
|
{
|
|
FInterface(const UClass& InAssetClass)
|
|
: FParameterInterface(OutputFormatMonoInterface::GetVersion().Name, OutputFormatMonoInterface::GetVersion().Number.ToInterfaceVersion(), InAssetClass)
|
|
{
|
|
Outputs =
|
|
{
|
|
{
|
|
LOCTEXT("GeneratedAudioDisplayName", "Out Mono"),
|
|
LOCTEXT("GeneratedAudioDescription", "The resulting mono output from this source."),
|
|
GetMetasoundDataTypeName<FAudioBuffer>(),
|
|
Outputs::MonoOut
|
|
}
|
|
};
|
|
}
|
|
};
|
|
|
|
return MakeShared<FInterface>(InUClass);
|
|
}
|
|
} // namespace OutputFormatMonoInterface
|
|
#undef AUDIO_PARAMETER_INTERFACE_NAMESPACE
|
|
|
|
#define AUDIO_PARAMETER_INTERFACE_NAMESPACE "UE.OutputFormat.Stereo"
|
|
namespace OutputFormatStereoInterface
|
|
{
|
|
const FMetasoundFrontendVersion& GetVersion()
|
|
{
|
|
static const FMetasoundFrontendVersion Version = { AUDIO_PARAMETER_INTERFACE_NAMESPACE, { 1, 0 } };
|
|
return Version;
|
|
}
|
|
|
|
namespace Outputs
|
|
{
|
|
const FName LeftOut = AUDIO_PARAMETER_INTERFACE_MEMBER_DEFINE("Audio:0");
|
|
const FName RightOut = AUDIO_PARAMETER_INTERFACE_MEMBER_DEFINE("Audio:1");
|
|
}
|
|
|
|
Audio::FParameterInterfacePtr CreateInterface(const UClass& InUClass)
|
|
{
|
|
struct FInterface : public Audio::FParameterInterface
|
|
{
|
|
FInterface(const UClass& InAssetClass)
|
|
: FParameterInterface(OutputFormatStereoInterface::GetVersion().Name, OutputFormatStereoInterface::GetVersion().Number.ToInterfaceVersion(), InAssetClass)
|
|
{
|
|
Outputs =
|
|
{
|
|
{
|
|
LOCTEXT("GeneratedLeftDisplayName", "Out Left"),
|
|
LOCTEXT("GeneratedLeftDescription", "The resulting left channel output audio from this source."),
|
|
GetMetasoundDataTypeName<FAudioBuffer>(),
|
|
Outputs::LeftOut
|
|
},
|
|
{
|
|
LOCTEXT("GeneratedLeftDisplayName", "Out Right"),
|
|
LOCTEXT("GeneratedLeftDescription", "The resulting right channel output audio from this source."),
|
|
GetMetasoundDataTypeName<FAudioBuffer>(),
|
|
Outputs::RightOut
|
|
}
|
|
};
|
|
}
|
|
};
|
|
|
|
return MakeShared<FInterface>(InUClass);
|
|
}
|
|
} // namespace OutputFormatStereoInterface
|
|
#undef AUDIO_PARAMETER_INTERFACE_NAMESPACE
|
|
}
|
|
}
|
|
#undef LOCTEXT_NAMESPACE |