Files
UnrealEngineUWP/Engine/Source/Runtime/AudioMixer/Private/SoundFileIO/SoundFileIOManager.cpp
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

102 lines
2.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "SoundFileIOManager.h"
#include "SoundFileIOManagerImpl.h"
#include "CoreMinimal.h"
#include "Templates/UniquePtr.h"
namespace Audio
{
FSoundFileIOManager::FSoundFileIOManager()
{
Impl = TUniquePtr<FSoundFileIOManagerImpl>(new FSoundFileIOManagerImpl());
}
FSoundFileIOManager::~FSoundFileIOManager()
{
}
TSharedPtr<ISoundFileReader> FSoundFileIOManager::CreateSoundFileReader()
{
if (Impl.IsValid())
{
return Impl->CreateSoundFileReader();
}
return nullptr;
}
TSharedPtr<ISoundFileReader> FSoundFileIOManager::CreateSoundDataReader()
{
if (Impl.IsValid())
{
return Impl->CreateSoundDataReader();
}
return nullptr;
}
TSharedPtr<ISoundFileWriter> FSoundFileIOManager::CreateSoundFileWriter()
{
if (Impl.IsValid())
{
return Impl->CreateSoundFileWriter();
}
return nullptr;
}
bool FSoundFileIOManager::GetSoundFileDescription(const FString& FilePath, FSoundFileDescription& OutputDescription, TArray<ESoundFileChannelMap::Type>& OutChannelMap)
{
if (Impl.IsValid())
{
return Impl->GetSoundFileDescription(FilePath, OutputDescription, OutChannelMap);
}
return false;
}
bool FSoundFileIOManager::GetSoundFileDescription(const FString& FilePath, FSoundFileDescription& OutputDescription)
{
if (Impl.IsValid())
{
return Impl->GetSoundFileDescription(FilePath, OutputDescription);
}
return false;
}
bool FSoundFileIOManager::GetFileExtensionForFormatFlags(int32 FormatFlags, FString& OutExtension)
{
if (Impl.IsValid())
{
return Impl->GetFileExtensionForFormatFlags(FormatFlags, OutExtension);
}
return false;
}
ESoundFileError::Type FSoundFileIOManager::GetSoundFileInfoFromPath(const FString& FilePath, FSoundFileDescription& Description, TArray<ESoundFileChannelMap::Type>& ChannelMap)
{
if (Impl.IsValid())
{
return Impl->GetSoundFileInfoFromPath(FilePath, Description, ChannelMap);
}
return ESoundFileError::Type::UNKNOWN;
}
ESoundFileError::Type FSoundFileIOManager::LoadSoundFileFromPath(const FString& FilePath, FSoundFileDescription& Description, TArray<ESoundFileChannelMap::Type>& ChannelMap, TArray<uint8>& BulkData)
{
if (Impl.IsValid())
{
return Impl->LoadSoundFileFromPath(FilePath, Description, ChannelMap, BulkData);
}
return ESoundFileError::Type::UNKNOWN;
}
}