// Copyright Epic Games, Inc. All Rights Reserved.
#include"MetasoundRouter.h"
#include"MetasoundOperatorInterface.h"
#include"CoreMinimal.h"
#include"HAL/IConsoleManager.h"
// Convenience exec commands to push values to global params.
staticFAutoConsoleCommandGPushFloatCommand(
TEXT("au.metasound.SetFloat"),
TEXT("Use this with au.metasound.SetFloat [address] [value]. Pushes a parameter value directly to a global address, which can then be received by Metasounds using a Receive node."),
FConsoleCommandWithArgsDelegate::CreateStatic(
[](constTArray<FString>&Args)
{
if(Args.Num()<2)
{
UE_LOG(LogTemp,Warning,TEXT("au.metasound.SetFloat should be called with two args- the address to send to and the value to send."));
UE_LOG(LogTemp,Warning,TEXT("au.metasound.SetFloat failed, likely because the channel did not support floats or the channel did not exist."));
}
})
);
staticFAutoConsoleCommandGPushBoolCommand(
TEXT("au.metasound.SetBool"),
TEXT("Use this with au.metasound.SetBool [address] [value]. Pushes a parameter value directly to a global address, which can then be received by Metasounds using a Receive node."),
FConsoleCommandWithArgsDelegate::CreateStatic(
[](constTArray<FString>&Args)
{
if(Args.Num()<2)
{
UE_LOG(LogTemp,Warning,TEXT("au.metasound.SetBool should be called with two args- the address to send to and the value to send."));
UE_LOG(LogTemp,Warning,TEXT("au.metasound.SetBool failed, likely because the channel did not support floats or the channel did not exist."));
}
})
);
staticFAutoConsoleCommandGPushIntCommand(
TEXT("au.metasound.SetInt"),
TEXT("Use this with au.metasound.SetInt [address] [value]. Pushes a parameter value directly to a global address, which can then be received by Metasounds using a Receive node."),
FConsoleCommandWithArgsDelegate::CreateStatic(
[](constTArray<FString>&Args)
{
if(Args.Num()<2)
{
UE_LOG(LogTemp,Warning,TEXT("au.metasound.SetBool should be called with two args- the address to send to and the value to send."));
UE_LOG(LogTemp,Warning,TEXT("au.metasound.SetInt failed, likely because the channel did not support floats or the channel did not exist."));
}
})
);
staticFAutoConsoleCommandGPushStringCommand(
TEXT("au.metasound.SetString"),
TEXT("Use this with au.metasound.SetString [address] [value]. Pushes a parameter value directly to a global address, which can then be received by Metasounds using a Receive node."),
FConsoleCommandWithArgsDelegate::CreateStatic(
[](constTArray<FString>&Args)
{
if(Args.Num()<2)
{
UE_LOG(LogTemp,Warning,TEXT("au.metasound.SetBool should be called with two args- the address to send to and the value to send."));