Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundEngine/Public/MetasoundWave.h
phil popp 96ab5837f2 Deprecate use of TUniquePtr in Audio::IProxyData
Introduce TSharedPtr<Audio::IProxyData> CreateProxyData()
Fix up deprecated callsites.

#jira UE-162062
#rb Rob.Gay
#fyi Miles.Flanagan
#preflight 639a0f262960b732207fc1e3

[CL 23515287 by phil popp in ue5-main branch]
2022-12-14 13:56:22 -05:00

54 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MetasoundDataReference.h"
#include "MetasoundDataTypeRegistrationMacro.h"
#include "IAudioProxyInitializer.h"
#include "Sound/SoundWave.h"
#include "IAudioCodecRegistry.h"
#include "IAudioCodec.h"
#include "DSP/InterpolatedLinearPitchShifter.h"
namespace Metasound
{
// Forward declare ReadRef
class FWaveAsset;
typedef TDataReadReference<FWaveAsset> FWaveAssetReadRef;
// Metasound data type that holds onto a weak ptr. Mostly used as a placeholder until we have a proper proxy type.
class METASOUNDENGINE_API FWaveAsset
{
FSoundWaveProxyPtr SoundWaveProxy;
public:
FWaveAsset() = default;
FWaveAsset(const FWaveAsset&) = default;
FWaveAsset& operator=(const FWaveAsset& Other) = default;
FWaveAsset(const TSharedPtr<Audio::IProxyData>& InInitData);
bool IsSoundWaveValid() const;
const FSoundWaveProxyPtr& GetSoundWaveProxy() const
{
return SoundWaveProxy;
}
const FSoundWaveProxy* operator->() const
{
return SoundWaveProxy.Get();
}
FSoundWaveProxy* operator->()
{
return SoundWaveProxy.Get();
}
};
DECLARE_METASOUND_DATA_REFERENCE_TYPES(FWaveAsset, METASOUNDENGINE_API, FWaveAssetTypeInfo, FWaveAssetReadRef, FWaveAssetWriteRef)
}