You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb rob.gay, phil.popp #preflight 6414cabd345ab08524fc9542 [CL 24723801 by charlie huguenard in ue5-main branch]
65 lines
1.5 KiB
C++
65 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#pragma once
|
|
|
|
#include "Analysis/MetasoundFrontendVertexAnalyzer.h"
|
|
#include "Containers/Array.h"
|
|
#include "HAL/Platform.h"
|
|
#include "MetasoundAssetBase.h"
|
|
#include "MetasoundRouter.h"
|
|
#include "Templates/UniquePtr.h"
|
|
|
|
|
|
// Forward Declarations
|
|
class FMetasoundAssetBase;
|
|
class UAudioComponent;
|
|
|
|
namespace Metasound
|
|
{
|
|
// Forward Declarations
|
|
class FOperatorSettings;
|
|
|
|
namespace Frontend
|
|
{
|
|
// Pairs an IReceiver with a given AnalyzerAddress, which enables
|
|
// watching a particular analyzer result on any given thread.
|
|
class METASOUNDFRONTEND_API FMetasoundAnalyzerView
|
|
{
|
|
TMap<FName, TSharedPtr<IReceiver>> OutputReceivers;
|
|
|
|
public:
|
|
const FAnalyzerAddress AnalyzerAddress = { };
|
|
|
|
FMetasoundAnalyzerView() = default;
|
|
FMetasoundAnalyzerView(FAnalyzerAddress&& InAnalyzerAddress);
|
|
|
|
void BindToAllOutputs(const FOperatorSettings& InOperatorSettings);
|
|
bool UnbindOutput(FName InOutputName);
|
|
|
|
template <typename DataType>
|
|
bool TryGetOutputData(FName InOutputName, DataType& OutValue)
|
|
{
|
|
TSharedPtr<IReceiver>* Receiver = OutputReceivers.Find(InOutputName);
|
|
if (Receiver && Receiver->IsValid())
|
|
{
|
|
TReceiver<DataType>& TypedReceiver = (*Receiver)->GetAs<TReceiver<DataType>>();
|
|
if (TypedReceiver.CanPop())
|
|
{
|
|
TypedReceiver.Pop(OutValue);
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
struct FBoundOutputDescription
|
|
{
|
|
FName Name;
|
|
FName TypeName;
|
|
};
|
|
|
|
TArray<FBoundOutputDescription> GetBoundOutputDescriptions() const;
|
|
};
|
|
}
|
|
}
|