2019-12-26 14:45:42 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2019-08-26 18:35:22 -04:00
|
|
|
|
|
|
|
|
#include "SignalProcessingModule.h"
|
|
|
|
|
#include "Modules/ModuleManager.h"
|
2020-02-06 14:31:11 -05:00
|
|
|
#include "Features/IModularFeatures.h"
|
|
|
|
|
#include "DSP/FFTAlgorithm.h"
|
|
|
|
|
#include "DSP/ConvolutionAlgorithm.h"
|
|
|
|
|
#include "DSP/AudioFFT.h"
|
|
|
|
|
#include "VectorFFT.h"
|
|
|
|
|
#include "UniformPartitionConvolution.h"
|
2019-08-26 18:35:22 -04:00
|
|
|
|
2020-02-06 14:31:11 -05:00
|
|
|
namespace Audio
|
2019-08-26 18:35:22 -04:00
|
|
|
{
|
2020-02-06 14:31:11 -05:00
|
|
|
class FSignalProcessingModule : public IModuleInterface
|
2019-08-26 18:35:22 -04:00
|
|
|
{
|
2020-02-06 14:31:11 -05:00
|
|
|
FVectorFFTFactory VectorFFTAlgorithmFactory;
|
|
|
|
|
|
|
|
|
|
FUniformPartitionConvolutionFactory UniformPartitionConvolutionFactory;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
virtual void StartupModule() override
|
|
|
|
|
{
|
|
|
|
|
// FFT factories to register
|
|
|
|
|
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(), &VectorFFTAlgorithmFactory);
|
|
|
|
|
|
|
|
|
|
// Convolution factories to unregister
|
|
|
|
|
IModularFeatures::Get().UnregisterModularFeature(IConvolutionAlgorithmFactory::GetModularFeatureName(), &UniformPartitionConvolutionFactory);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
2019-08-26 18:35:22 -04:00
|
|
|
|
|
|
|
|
DEFINE_LOG_CATEGORY(LogSignalProcessing);
|
|
|
|
|
|
2020-02-06 14:31:11 -05:00
|
|
|
IMPLEMENT_MODULE(Audio::FSignalProcessingModule, SignalProcessing);
|