You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb phil.popp, jake.burga, simon.yan #preflight 64307638b4329f6f1a401afc [CL 24976780 by charlie huguenard in ue5-main branch]
43 lines
1.4 KiB
C++
43 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "MetasoundFrontendController.h"
|
|
#include "MetasoundFrontendDocument.h"
|
|
#include "MetasoundGenerator.h"
|
|
#include "MetasoundNodeInterface.h"
|
|
|
|
namespace Metasound::Test
|
|
{
|
|
/** Helper to make testing nodes simpler. */
|
|
class METASOUNDENGINETEST_API FNodeTestGraphBuilder
|
|
{
|
|
public:
|
|
FNodeTestGraphBuilder();
|
|
|
|
/** Add a node to the graph */
|
|
Frontend::FNodeHandle AddNode(const FNodeClassName& ClassName, int32 MajorVersion) const;
|
|
|
|
/** Add an input node to the graph */
|
|
Frontend::FNodeHandle AddInput(const FName& InputName, const FName& TypeName) const;
|
|
|
|
/** Add an output node to the graph */
|
|
Frontend::FNodeHandle AddOutput(const FName& OutputName, const FName& TypeName);
|
|
|
|
TUniquePtr<FMetasoundGenerator> BuildGenerator(FSampleRate SampleRate = 48000, int32 SamplesPerBlock = 256) const;
|
|
|
|
/** Helper that will add a single node, wire up the node's inputs and outputs, and hand back the graph's operator */
|
|
static TUniquePtr<FMetasoundGenerator> MakeSingleNodeGraph(
|
|
const FNodeClassName& ClassName,
|
|
int32 MajorVersion,
|
|
FSampleRate SampleRate = 48000,
|
|
int32 SamplesPerBlock = 256);
|
|
|
|
private:
|
|
FMetasoundFrontendDocument Document;
|
|
Frontend::FDocumentHandle DocumentHandle = Frontend::IDocumentController::GetInvalidHandle();
|
|
Frontend::FGraphHandle RootGraph = Frontend::IGraphController::GetInvalidHandle();
|
|
TArray<FVertexName> AudioOutputNames;
|
|
};
|
|
}
|