You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Enforce single UObject class --> MetaSound Frontend class & fix-up callsites relying on ArrayObject type/literals using cached proxy type. This lead to confusion WRT what registered type is directly associated with a given UObject & possible bugs therein. #rb phil.popp #rnx #jira none #preflight 62c890fb2823f28cf281a8f1 [CL 21100292 by Rob Gay in ue5-main branch]
61 lines
2.3 KiB
C++
61 lines
2.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#include "MetasoundEngineModule.h"
|
|
|
|
#include "Analysis/MetasoundFrontendAnalyzerRegistry.h"
|
|
#include "Metasound.h"
|
|
#include "MetasoundDataReference.h"
|
|
#include "MetasoundDataTypeRegistrationMacro.h"
|
|
#include "MetasoundEngineArchetypes.h"
|
|
#include "MetasoundFrontendDataTypeTraits.h"
|
|
#include "MetasoundInterface.h"
|
|
#include "MetasoundSource.h"
|
|
#include "MetasoundTrace.h"
|
|
#include "MetasoundUObjectRegistry.h"
|
|
#include "MetasoundWave.h"
|
|
#include "MetasoundWaveTable.h"
|
|
#include "MetasoundAudioBus.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "Sound/AudioSettings.h"
|
|
|
|
DEFINE_LOG_CATEGORY(LogMetasoundEngine);
|
|
|
|
|
|
REGISTER_METASOUND_DATATYPE(Metasound::FAudioBusAsset, "AudioBusAsset", Metasound::ELiteralType::UObjectProxy, UAudioBus);
|
|
REGISTER_METASOUND_DATATYPE(Metasound::FWaveAsset, "WaveAsset", Metasound::ELiteralType::UObjectProxy, USoundWave);
|
|
REGISTER_METASOUND_DATATYPE(WaveTable::FWaveTable, "WaveTable", Metasound::ELiteralType::FloatArray)
|
|
REGISTER_METASOUND_DATATYPE(Metasound::FWaveTableBankAsset, "WaveTableBankAsset", Metasound::ELiteralType::UObjectProxy, UWaveTableBank);
|
|
|
|
|
|
class FMetasoundEngineModule : public IMetasoundEngineModule
|
|
{
|
|
virtual void StartupModule() override
|
|
{
|
|
METASOUND_LLM_SCOPE;
|
|
FModuleManager::Get().LoadModuleChecked("MetasoundGraphCore");
|
|
FModuleManager::Get().LoadModuleChecked("MetasoundFrontend");
|
|
FModuleManager::Get().LoadModuleChecked("MetasoundStandardNodes");
|
|
FModuleManager::Get().LoadModuleChecked("MetasoundGenerator");
|
|
FModuleManager::Get().LoadModuleChecked("AudioCodecEngine");
|
|
FModuleManager::Get().LoadModuleChecked("WaveTable");
|
|
|
|
// Register engine-level parameter interfaces if not done already.
|
|
// (Potentially not already called if plugin is loaded while cooking.)
|
|
UAudioSettings* AudioSettings = GetMutableDefault<UAudioSettings>();
|
|
check(AudioSettings);
|
|
AudioSettings->RegisterParameterInterfaces();
|
|
|
|
// Register interfaces
|
|
Metasound::Engine::RegisterInterfaces();
|
|
|
|
// Flush node registration queue
|
|
FMetasoundFrontendRegistryContainer::Get()->RegisterPendingNodes();
|
|
|
|
// Register Analyzers
|
|
Metasound::Frontend::IVertexAnalyzerRegistry::Get().RegisterAnalyzerFactories();
|
|
|
|
UE_LOG(LogMetasoundEngine, Log, TEXT("MetaSound Engine Initialized"));
|
|
}
|
|
};
|
|
|
|
IMPLEMENT_MODULE(FMetasoundEngineModule, MetasoundEngine);
|