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

#include <IMediaAudioSample.h>

Public Member Functions

virtual const voidGetBuffer ()=0
 
virtual uint32 GetChannels () const =0
 
virtual FTimespan GetDuration () const =0
 
virtual EMediaAudioSampleFormat GetFormat () const =0
 
virtual uint32 GetFrames () const =0
 
virtual uint32 GetSampleRate () const =0
 
virtual FMediaTimeStamp GetTime () const =0
 
virtual TOptional< FTimecodeGetTimecode () const
 
virtual ~IMediaAudioSample ()
 

Detailed Description

Interface for media audio samples.

Constructor & Destructor Documentation

◆ ~IMediaAudioSample()

virtual IMediaAudioSample::~IMediaAudioSample ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ GetBuffer()

virtual const void * IMediaAudioSample::GetBuffer ( )
pure virtual

Get the sample data.

The returned buffer is only valid for the life time of this sample.

Returns
Pointer to data buffer.
See also
GetChannels, GetDuration, GetFormat, GetFrames, GetRate, GetTime

◆ GetChannels()

virtual uint32 IMediaAudioSample::GetChannels ( ) const
pure virtual

Get the sample's number of channels.

Returns
Number of channels.
See also
GetBuffer, GetDuration, GetFormat, GetFrames, GetRate, GetTime

◆ GetDuration()

virtual FTimespan IMediaAudioSample::GetDuration ( ) const
pure virtual

Get the amount of time for which the sample is valid.

A duration of zero indicates that the sample is valid until the timecode of the next sample in the queue.

Returns
Sample duration.
See also
GetBuffer, GetChannels, GetFormat, GetFrames, GetRate, GetTime

◆ GetFormat()

virtual EMediaAudioSampleFormat IMediaAudioSample::GetFormat ( ) const
pure virtual

Get the audio sample format.

Returns
Sample type.
See also
GetBuffer, GetChannels, GetDuration, GetFrames, GetRate, GetTime

◆ GetFrames()

virtual uint32 IMediaAudioSample::GetFrames ( ) const
pure virtual

Get the number of frames in the buffer.

A frame consists of one sample value per channel.

Returns
Frame count.
See also
GetBuffer, GetChannels, GetDuration, GetFormat, GetRate, GetTime

◆ GetSampleRate()

virtual uint32 IMediaAudioSample::GetSampleRate ( ) const
pure virtual

Get the sample's sampling rate (in audio frames per second).

Returns
Sample rate, i.e. 44100 Hz.
See also
GetBuffer, GetChannels, GetDuration, GetFormat, GetFrames, GetTime

◆ GetTime()

virtual FMediaTimeStamp IMediaAudioSample::GetTime ( ) const
pure virtual

Get the sample time (in the player's local clock).

This value is used primarily for debugging purposes.

Returns
Sample time.
See also
GetBuffer, GetChannels, GetDuration, GetFormat, GetFrames, GetSampleRate

◆ GetTimecode()

virtual TOptional< FTimecode > IMediaAudioSample::GetTimecode ( ) const
inlinevirtual

Get the sample timecode if available.

Returns
Sample timecode.
See also
GetTime

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