UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ICompressedAudioInfo Class Referenceabstract

#include <AudioDecompress.h>

+ Inheritance diagram for ICompressedAudioInfo:

Public Member Functions

ENGINE_API ICompressedAudioInfo ()
 
virtual ENGINE_API ~ICompressedAudioInfo ()
 
virtual bool ReadCompressedInfo (const uint8 *InSrcBufferData, uint32 InSrcBufferDataSize, struct FSoundQualityInfo *QualityInfo)=0
 
virtual bool ReadCompressedData (uint8 *Destination, bool bLooping, uint32 BufferSize)=0
 
virtual void SeekToTime (const float SeekTime)=0
 
virtual void SeekToFrame (const uint32 Frame)=0
 
virtual void ExpandFile (uint8 *DstBuffer, struct FSoundQualityInfo *QualityInfo)=0
 
virtual void EnableHalfRate (bool HalfRate)=0
 
virtual uint32 GetSourceBufferSize () const =0
 
virtual bool UsesVorbisChannelOrdering () const =0
 
virtual int GetStreamBufferSize () const =0
 
virtual bool IsStreamedCompressedInfo () const
 
virtual bool SupportsStreaming () const
 
virtual bool ReleaseStreamChunk (bool bBlockUntilReleased)
 
ENGINE_API bool StreamCompressedInfo (USoundWave *Wave, struct FSoundQualityInfo *QualityInfo)
 
ENGINE_API bool StreamCompressedInfo (const FSoundWaveProxyPtr &Wave, struct FSoundQualityInfo *QualityInfo)
 
virtual ENGINE_API bool HasError () const
 
virtual bool StreamCompressedData (uint8 *Destination, bool bLooping, uint32 BufferSize, int32 &OutNumBytesStreamed)
 
virtual int32 GetCurrentChunkIndex () const
 
virtual int32 GetCurrentChunkOffset () const
 
virtual const FSoundWaveProxyPtrGetStreamingSoundWave () const
 

Protected Member Functions

virtual bool StreamCompressedInfoInternal (const FSoundWaveProxyPtr &InWaveProxy, struct FSoundQualityInfo *QualityInfo)=0
 
bool WantsFilteredLogging () const
 

Protected Attributes

bool bHasError = false
 
bool bWantsFilteredLogging = false
 
FSoundWaveProxyPtr StreamingSoundWave
 

Detailed Description

Interface class to decompress various types of audio data

Constructor & Destructor Documentation

◆ ICompressedAudioInfo()

ICompressedAudioInfo::ICompressedAudioInfo ( )

◆ ~ICompressedAudioInfo()

ICompressedAudioInfo::~ICompressedAudioInfo ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ EnableHalfRate()

virtual void ICompressedAudioInfo::EnableHalfRate ( bool  HalfRate)
pure virtual

Sets decode to half-rate

Parameters
HalfRateWhether Half rate is enabled

Implemented in FADPCMAudioInfo, and IStreamedCompressedInfo.

◆ ExpandFile()

virtual void ICompressedAudioInfo::ExpandFile ( uint8 DstBuffer,
struct FSoundQualityInfo QualityInfo 
)
pure virtual

Decompress an entire data file to a TArray

Implemented in FADPCMAudioInfo, and IStreamedCompressedInfo.

◆ GetCurrentChunkIndex()

virtual int32 ICompressedAudioInfo::GetCurrentChunkIndex ( ) const
inlinevirtual

Gets the chunk index that was last read from (for Streaming Manager requests)

Reimplemented in FADPCMAudioInfo, and IStreamedCompressedInfo.

◆ GetCurrentChunkOffset()

virtual int32 ICompressedAudioInfo::GetCurrentChunkOffset ( ) const
inlinevirtual

Gets the offset into the chunk that was last read to (for Streaming Manager priority)

Reimplemented in FADPCMAudioInfo, and IStreamedCompressedInfo.

◆ GetSourceBufferSize()

virtual uint32 ICompressedAudioInfo::GetSourceBufferSize ( ) const
pure virtual

Gets the size of the source buffer originally passed to the info class (bytes)

Implemented in FADPCMAudioInfo, and IStreamedCompressedInfo.

◆ GetStreamBufferSize()

virtual int ICompressedAudioInfo::GetStreamBufferSize ( ) const
pure virtual

Gets the preferred size for a streaming buffer for this decompression scheme

Implemented in FADPCMAudioInfo, and IStreamedCompressedInfo.

◆ GetStreamingSoundWave()

virtual const FSoundWaveProxyPtr & ICompressedAudioInfo::GetStreamingSoundWave ( ) const
inlinevirtual

Return the streaming sound wave used by this decoder. Returns nullptr if there is not a streaming sound wave.

◆ HasError()

bool ICompressedAudioInfo::HasError ( ) const
virtual

Returns true if a non-recoverable error has occurred.

Reimplemented in FBinkAudioInfo, and FRadAudioInfo.

◆ IsStreamedCompressedInfo()

virtual bool ICompressedAudioInfo::IsStreamedCompressedInfo ( ) const
inlinevirtual

Returns whether this instance can be cast to a IStreamedCompressedInfo. Surprisingly SupportsStreaming doesn't work for this.

Reimplemented in IStreamedCompressedInfo.

◆ ReadCompressedData()

virtual bool ICompressedAudioInfo::ReadCompressedData ( uint8 Destination,
bool  bLooping,
uint32  BufferSize 
)
pure virtual

Decompresses data to raw PCM data.

Parameters
Destinationwhere to place the decompressed sound
bLoopingwhether to loop the sound by seeking to the start, or pad the buffer with zeroes
BufferSizenumber of bytes of PCM data to create
Returns
bool true if the end of the data was reached (for both single shot and looping sounds)

Implemented in FADPCMAudioInfo, and IStreamedCompressedInfo.

◆ ReadCompressedInfo()

virtual bool ICompressedAudioInfo::ReadCompressedInfo ( const uint8 InSrcBufferData,
uint32  InSrcBufferDataSize,
struct FSoundQualityInfo QualityInfo 
)
pure virtual

Reads the header information of a compressed format

Parameters
InSrcBufferDataSource compressed data
InSrcBufferDataSizeSize of compressed data
QualityInfoQuality Info (to be filled out). This can be null in the case of most implementations of FSoundBuffer::ReadCompressedInfo

Implemented in IStreamedCompressedInfo, and FADPCMAudioInfo.

◆ ReleaseStreamChunk()

virtual bool ICompressedAudioInfo::ReleaseStreamChunk ( bool  bBlockUntilReleased)
inlinevirtual

This can be called to explicitly release this decoder's reference to a chunk of compressed audio without destroying the decoder itself.

Parameters
bBlockUntilReleasedwhen set to true will cause this call to block if the decoder is currently using the chunk.
Returns
true if the chunk was released, false otherwise.

Reimplemented in FADPCMAudioInfo.

◆ SeekToFrame()

virtual void ICompressedAudioInfo::SeekToFrame ( const uint32  Frame)
pure virtual

Seeks to specific frame in the audio (Some formats might not be seekable)

Implemented in FPcmAudioInfoHybrid, FADPCMAudioInfo, IStreamedCompressedInfo, FOpusAudioInfo, FBinkAudioInfo, and FRadAudioInfo.

◆ SeekToTime()

virtual void ICompressedAudioInfo::SeekToTime ( const float  SeekTime)
pure virtual

Seeks to time (Some formats might not be seekable)

Implemented in FPcmAudioInfoHybrid, FADPCMAudioInfo, IStreamedCompressedInfo, FOpusAudioInfo, FBinkAudioInfo, and FRadAudioInfo.

◆ StreamCompressedData()

virtual bool ICompressedAudioInfo::StreamCompressedData ( uint8 Destination,
bool  bLooping,
uint32  BufferSize,
int32 OutNumBytesStreamed 
)
inlinevirtual

Decompresses streamed data to raw PCM data.

Parameters
Destinationwhere to place the decompressed sound
bLoopingwhether to loop the sound by seeking to the start, or pad the buffer with zeros
BufferSizenumber of bytes of PCM data to create
Returns
bool true if the end of the data was reached (for both single shot and looping sounds)

Reimplemented in FADPCMAudioInfo, and IStreamedCompressedInfo.

◆ StreamCompressedInfo() [1/2]

bool ICompressedAudioInfo::StreamCompressedInfo ( const FSoundWaveProxyPtr Wave,
struct FSoundQualityInfo QualityInfo 
)

◆ StreamCompressedInfo() [2/2]

bool ICompressedAudioInfo::StreamCompressedInfo ( USoundWave Wave,
struct FSoundQualityInfo QualityInfo 
)

Streams the header information of a compressed format

Parameters
WaveWave that will be read from to retrieve necessary chunk
QualityInfoQuality Info (to be filled out)

◆ StreamCompressedInfoInternal()

virtual bool ICompressedAudioInfo::StreamCompressedInfoInternal ( const FSoundWaveProxyPtr InWaveProxy,
struct FSoundQualityInfo QualityInfo 
)
protectedpure virtual

Internal override implemented by subclasses.

Implemented in IStreamedCompressedInfo, and FADPCMAudioInfo.

◆ SupportsStreaming()

virtual bool ICompressedAudioInfo::SupportsStreaming ( ) const
inlinevirtual

Whether this decompression class supports streaming decompression

Reimplemented in FADPCMAudioInfo, and IStreamedCompressedInfo.

◆ UsesVorbisChannelOrdering()

virtual bool ICompressedAudioInfo::UsesVorbisChannelOrdering ( ) const
pure virtual

Whether the decompressed audio will be arranged using Vorbis' channel ordering See http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 for details

Implemented in FADPCMAudioInfo, and IStreamedCompressedInfo.

◆ WantsFilteredLogging()

bool ICompressedAudioInfo::WantsFilteredLogging ( ) const
inlineprotected

Member Data Documentation

◆ bHasError

bool ICompressedAudioInfo::bHasError = false
mutableprotected

◆ bWantsFilteredLogging

bool ICompressedAudioInfo::bWantsFilteredLogging = false
protected

◆ StreamingSoundWave

FSoundWaveProxyPtr ICompressedAudioInfo::StreamingSoundWave
protected

The documentation for this class was generated from the following files: