Files
UnrealEngineUWP/Engine/Source/Runtime/AudioCodecEngine/Private/DecoderBackCompat.h
aurel cordonnier fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00

50 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "IAudioCodec.h"
namespace Audio
{
struct FBackCompatCodec : public ICodec
{
// Static version.
static const FCodecDetails& GetDetailsStatic();
// Query.
bool SupportsPlatform(FName InPlatformName) const override;
const FCodecDetails& GetDetails() const override;
// Factory for decoders
FDecoderPtr CreateDecoder(
IDecoder::FDecoderInputPtr InSrc,
IDecoder::FDecoderOutputPtr InDst) override;
};
struct FBackCompat : public IDecoder
{
IDecoder::FDecoderInputPtr Src = nullptr;
IDecoder::FDecoderOutputPtr Dst = nullptr;
FFormatDescriptorSection Desc;
IDecoderOutput::FRequirements Reqs;
TArray<int16> ResidualBuffer;
uint32 FrameOffset = 0;
FBackCompat(
IDecoder::FDecoderInputPtr InSrc,
IDecoder::FDecoderOutputPtr InDst );
bool HasError() const override
{
return false;
}
FDecodeReturn Decode(bool bLoop = false) override;
private:
bool bPreviousIsStreaming = false;
bool bIsFirstDecode = true;
};
}