UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FStreamedAudioChunkSeekTable Class Reference

#include <StreamedAudioChunkSeekTable.h>

Classes

struct  ISeekTableImpl
 

Public Member Functions

ENGINE_API int32 CalcSize () const
 
ENGINE_API FStreamedAudioChunkSeekTable (EChunkSeekTableMode InMode=EChunkSeekTableMode::ConstantSamplesPerEntry)
 
void Add (uint32 InTimeInAudioFrames, uint32 InOffset)
 
uint32 FindOffset (uint32 InTimeInAudioFrames) const
 
uint32 FindTime (uint32 InOffset) const
 
int32 Num () const
 
ENGINE_API bool Serialize (FArchive &Ar)
 
void Reset ()
 
bool GetAt (const uint32 InIndex, uint32 &OutOffset, uint32 &OutTime) const
 

Static Public Member Functions

static ENGINE_API int16 GetVersion ()
 
static ENGINE_API bool Parse (const uint8 *InMemory, uint32 InSize, uint32 &InOutOffset, FStreamedAudioChunkSeekTable &OutTable)
 
static ENGINE_API int32 CalcSize (int32 NumEntries, EChunkSeekTableMode InMode=EChunkSeekTableMode::ConstantSamplesPerEntry)
 

Detailed Description

Class representing an audio seek-table. Typically embedded in a bit-stream.

Constructor & Destructor Documentation

◆ FStreamedAudioChunkSeekTable()

FStreamedAudioChunkSeekTable::FStreamedAudioChunkSeekTable ( EChunkSeekTableMode  InMode = EChunkSeekTableMode::ConstantSamplesPerEntry)

Construct a seek-table. The mode determines the internal representation.

Parameters
InModeMode the table will operate in.

Member Function Documentation

◆ Add()

void FStreamedAudioChunkSeekTable::Add ( uint32  InTimeInAudioFrames,
uint32  InOffset 
)
inline

Add an item to the seek table.

Parameters
InTimeInAudioFramesTime of this entry in audio frames
InOffsetOffset in the file of where this time happens

◆ CalcSize() [1/2]

int32 FStreamedAudioChunkSeekTable::CalcSize ( ) const

Member version. Calculate the size needed for the table.

Returns
The Size of the Table in bytes including any header.

◆ CalcSize() [2/2]

int32 FStreamedAudioChunkSeekTable::CalcSize ( int32  NumEntries,
EChunkSeekTableMode  InMode = EChunkSeekTableMode::ConstantSamplesPerEntry 
)
static

Calculate the size needed for the table.

This is cheaper than serializing the entire struct and counting the bytes.

Parameters
InModeThe Mode the table is running in (i.e. constant/variable)
Returns
The Size of the Table in bytes including any header.

◆ FindOffset()

uint32 FStreamedAudioChunkSeekTable::FindOffset ( uint32  InTimeInAudioFrames) const
inline

Finds an offset for seeking given a time

Parameters
InTimeInAudioFramesTime to search for in audio frames
Returns
Offset indicated by the table. INDEX_NONE (~0) on error.

◆ FindTime()

uint32 FStreamedAudioChunkSeekTable::FindTime ( uint32  InOffset) const
inline

Finds a time given an offset (reverse look up)

Parameters
InOffsetOffset in the file
Returns
Time indicated by the table. INDEX_NONE (~0) on error.

◆ GetAt()

bool FStreamedAudioChunkSeekTable::GetAt ( const uint32  InIndex,
uint32 OutOffset,
uint32 OutTime 
) const
inline

Retrieves the Indexed item from the table

Parameters
InIndexIndex of item to retrieve (if out of bounds will fail)
OutOffsetThe found offset (if successful)
OutTimeThe found time (if successful)
Returns
True on Success, False otherwise.

◆ GetVersion()

int16 FStreamedAudioChunkSeekTable::GetVersion ( )
static

Gets the current version of Seek table. This can be used in the DDC key.

Returns
int16 Seek-table version

◆ Num()

int32 FStreamedAudioChunkSeekTable::Num ( ) const
inline

Get the number of Entries in the seek table.

Returns
Num of Items.

◆ Parse()

bool FStreamedAudioChunkSeekTable::Parse ( const uint8 InMemory,
uint32  InSize,
uint32 InOutOffset,
FStreamedAudioChunkSeekTable OutTable 
)
static

Parse a seek-table from memory.

Parameters
InMemoryPointer to memory where to load from.
InSizeSize of memory
InOutOffsetOutput the offset of the end of the table
OutTableTable that's loaded
Returns
true on Success, false on Failure

◆ Reset()

void FStreamedAudioChunkSeekTable::Reset ( )

Empties the table

◆ Serialize()

bool FStreamedAudioChunkSeekTable::Serialize ( FArchive Ar)

Serialize the table to/from the archive

Parameters
ArArchive to load/save
Returns
True on success, false on failure.

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