Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundEngine/Public/MetasoundAudioBus.h
helen yang 0650063b74 Add hidden friend GetHashType hash functions for MetaSound types for Array Random Get node refactor
#jira UE-211778

#rb phil.popp

[CL 33492636 by helen yang in ue5-main branch]
2024-05-07 15:58:09 -04:00

42 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MetasoundDataReference.h"
#include "MetasoundDataTypeRegistrationMacro.h"
#include "IAudioProxyInitializer.h"
#include "Sound/AudioBus.h"
namespace Metasound
{
// Forward declare ReadRef
class FAudioBus;
// Metasound data type that holds onto a weak ptr. Mostly used as a placeholder until we have a proper proxy type.
class METASOUNDENGINE_API FAudioBusAsset
{
FAudioBusProxyPtr AudioBusProxy;
public:
FAudioBusAsset() = default;
FAudioBusAsset(const FAudioBusAsset&) = default;
FAudioBusAsset& operator=(const FAudioBusAsset& Other) = default;
FAudioBusAsset(const TSharedPtr<Audio::IProxyData>& InInitData);
const FAudioBusProxyPtr& GetAudioBusProxy() const
{
return AudioBusProxy;
}
friend FORCEINLINE uint32 GetTypeHash(const Metasound::FAudioBusAsset& InAudioBusAsset)
{
return GetTypeHash(*InAudioBusAsset.GetAudioBusProxy());
}
};
DECLARE_METASOUND_DATA_REFERENCE_TYPES(FAudioBusAsset, METASOUNDENGINE_API, FAudioBusAssetTypeInfo, FAudioBusAssetReadRef, FAudioBusAssetWriteRef)
}