You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Implement/encapsulate binding for analyzer output/sender logic - Move to using FAnyDataReferences where possible over collections for analyzers - Misc clean-up #jira UE-147027 #rb phil.popp #preflight 627d3884332e182a583f19b3 [CL 20167469 by Rob Gay in ue5-main branch]
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#pragma once
|
|
|
|
#include "Analysis/MetasoundFrontendAnalyzerFactory.h"
|
|
#include "Containers/Array.h"
|
|
#include "DSP/BufferVectorOperations.h"
|
|
#include "DSP/EnvelopeFollower.h"
|
|
#include "MetasoundTrigger.h"
|
|
|
|
|
|
namespace Metasound
|
|
{
|
|
namespace Frontend
|
|
{
|
|
class METASOUNDFRONTEND_API FVertexAnalyzerTriggerDensity : public FVertexAnalyzerBase
|
|
{
|
|
public:
|
|
static const FName& GetAnalyzerName();
|
|
static const FName& GetDataType();
|
|
|
|
struct METASOUNDFRONTEND_API FOutputs
|
|
{
|
|
static const FAnalyzerOutput& GetValue();
|
|
|
|
};
|
|
|
|
class METASOUNDFRONTEND_API FFactory : public TVertexAnalyzerFactory<FVertexAnalyzerTriggerDensity>
|
|
{
|
|
public:
|
|
virtual const TArray<FAnalyzerOutput>& GetAnalyzerOutputs() const override
|
|
{
|
|
static const TArray<FAnalyzerOutput> Outputs { FOutputs::GetValue() };
|
|
return Outputs;
|
|
}
|
|
};
|
|
|
|
FVertexAnalyzerTriggerDensity(const FCreateAnalyzerParams& InParams);
|
|
virtual ~FVertexAnalyzerTriggerDensity() = default;
|
|
|
|
virtual void Execute() override;
|
|
|
|
private:
|
|
|
|
Audio::FEnvelopeFollower EnvelopeFollower;
|
|
TDataWriteReference<float> EnvelopeValue;
|
|
int32 NumFramesPerBlock = 0;
|
|
Audio::FAlignedFloatBuffer ScratchBuffer;
|
|
};
|
|
} // namespace Frontend
|
|
} // namespace Metasound
|