2020-09-08 18:12:55 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "IAudioCodec.h"
|
|
|
|
|
|
|
|
|
|
namespace Audio
|
|
|
|
|
{
|
2023-06-02 15:27:25 -04:00
|
|
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
|
|
|
|
|
|
|
|
|
struct UE_DEPRECATED(5.3, "Please use IAudioFormat/IStreamedCompressedInfo instead") FBackCompatCodec : public ICodec
|
2020-09-08 18:12:55 -04:00
|
|
|
{
|
|
|
|
|
// 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,
|
2023-06-02 15:27:25 -04:00
|
|
|
IDecoder::FDecoderOutputPtr InDst) override;
|
2020-09-08 18:12:55 -04:00
|
|
|
};
|
|
|
|
|
|
2023-06-02 15:27:25 -04:00
|
|
|
struct UE_DEPRECATED(5.3, "Please use IAudioFormat/IStreamedCompressedInfo instead") FBackCompat : public IDecoder
|
2020-09-08 18:12:55 -04:00
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-15 22:10:18 -04:00
|
|
|
FDecodeReturn Decode(bool bLoop = false) override;
|
2021-11-07 23:43:01 -05:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
bool bPreviousIsStreaming = false;
|
|
|
|
|
bool bIsFirstDecode = true;
|
2020-09-08 18:12:55 -04:00
|
|
|
};
|
2023-06-02 15:27:25 -04:00
|
|
|
|
|
|
|
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
2020-09-08 18:12:55 -04:00
|
|
|
}
|