You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb Ethan.Geller, Maxwell.Hayes #ROBOMERGE-SOURCE: CL 11285078 via CL 11285087 #ROBOMERGE-BOT: (v647-11244347) [CL 11285092 by phil popp in Main branch]
48 lines
1.7 KiB
C++
48 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SignalProcessingModule.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "Features/IModularFeatures.h"
|
|
#include "DSP/FFTAlgorithm.h"
|
|
#include "DSP/ConvolutionAlgorithm.h"
|
|
#include "DSP/AudioFFT.h"
|
|
#include "VectorFFT.h"
|
|
#include "UniformPartitionConvolution.h"
|
|
|
|
namespace Audio
|
|
{
|
|
class FSignalProcessingModule : public IModuleInterface
|
|
{
|
|
FAudioFFTAlgorithmFactory AudioFFTAlgorithmFactory;
|
|
FVectorFFTFactory VectorFFTAlgorithmFactory;
|
|
|
|
FUniformPartitionConvolutionFactory UniformPartitionConvolutionFactory;
|
|
|
|
public:
|
|
|
|
virtual void StartupModule() override
|
|
{
|
|
// FFT factories to register
|
|
IModularFeatures::Get().RegisterModularFeature(IFFTAlgorithmFactory::GetModularFeatureName(), &AudioFFTAlgorithmFactory);
|
|
IModularFeatures::Get().RegisterModularFeature(IFFTAlgorithmFactory::GetModularFeatureName(), &VectorFFTAlgorithmFactory);
|
|
|
|
// Convolution factories to register
|
|
IModularFeatures::Get().RegisterModularFeature(IConvolutionAlgorithmFactory::GetModularFeatureName(), &UniformPartitionConvolutionFactory);
|
|
}
|
|
|
|
virtual void ShutdownModule() override
|
|
{
|
|
// FFT Factories to unregister
|
|
IModularFeatures::Get().UnregisterModularFeature(IFFTAlgorithmFactory::GetModularFeatureName(), &AudioFFTAlgorithmFactory);
|
|
IModularFeatures::Get().UnregisterModularFeature(IFFTAlgorithmFactory::GetModularFeatureName(), &VectorFFTAlgorithmFactory);
|
|
|
|
// Convolution factories to unregister
|
|
IModularFeatures::Get().UnregisterModularFeature(IConvolutionAlgorithmFactory::GetModularFeatureName(), &UniformPartitionConvolutionFactory);
|
|
}
|
|
};
|
|
}
|
|
|
|
DEFINE_LOG_CATEGORY(LogSignalProcessing);
|
|
|
|
IMPLEMENT_MODULE(Audio::FSignalProcessingModule, SignalProcessing);
|