FMediaIOCoreAudioSampleBase

Implements a media audio sample.

Windows
MacOS
Linux

Inheritance Hierarchy

IMediaAudioSample

IMediaPoolable

FMediaIOCoreAudioSampleBase

References

Module

MediaIOCore

Header

/Engine/Plugins/Media/MediaIOFramework/Source/MediaIOCore/Public/MediaIOCoreAudioSampleBase.h

Include

#include "MediaIOCoreAudioSampleBase.h"

Syntax

class FMediaIOCoreAudioSampleBase :
    public IMediaAudioSample,
    public IMediaPoolable

Remarks

Implements a media audio sample.

Variables

Name Description

Protected variable

TArray< int32 >

 

Buffer

The sample's frame buffer.

Protected variable

uint32

 

Channels

Number of audio channels.

Protected variable

FTimespan

 

Duration

The duration for which the sample is valid.

Protected variable

uint32

 

SampleRate

Audio sample rate (in samples per second).

Protected variable

FTimespan

 

Time

Sample time.

Protected variable

TOptional< FTim...

 

Timecode

Sample timecode.

Constructors

Name Description

Public function

FMediaIOCoreAudioSampleBase()

Default constructor.

Functions

Name Description

Protected function Virtual

void

 

FreeSample()

Public function

bool

 

Initialize

(
    TArray< int32 > InAudioBuffer,
    uint32 InNumberOfChannels,
    uint32 InSampleRate,
    FTimespan InTime,
    const TOptional< FTimecode >& InTi...
)

Initialize the sample.

Public function

bool

 

Initialize

(
    const int32* InAudioBuffer,
    uint32 InBufferSize,
    uint32 InNumberOfChannels,
    uint32 InSampleRate,
    FTimespan InTime,
    const TOptional< FTimecode >& InTi...
)

Initialize the sample.

Public function Virtual

void *

 

RequestBuffer

(
    uint32 InBufferSize
)

Request an uninitialized sample buffer.

Public function

bool

 

SetBuffer

(
    TArray< int32 > InAudioBuffer
)

Set the sample buffer.

Public function

bool

 

SetBuffer

(
    const int32* InAudioBuffer,
    uint32 InBufferSize
)

Set the sample buffer.

Public function

bool

 

SetProperties

(
    uint32 InBufferSize,
    uint32 InNumberOfChannels,
    uint32 InSampleRate,
    FTimespan InTime,
    const TOptional< FTimecode >& InTi...
)

Set the sample properties.

Overridden from IMediaAudioSample

Name Description

Public function Virtual

const void &...

 

GetBuffer()

Get the sample data.

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

Public function Virtual Const

uint32

 

GetChannels()

Get the sample's number of channels.

Public function Virtual Const

FTimespan

 

GetDuration()

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

Public function Virtual Const

EMediaAudioS...

 

GetFormat()

Get the audio sample format.

Public function Virtual Const

uint32

 

GetFrames()

Get the number of frames in the buffer.

A frame consists of one sample value per channel.

Public function Virtual Const

uint32

 

GetSampleRate()

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

Public function Virtual Const

FMediaTimeSt...

 

GetTime()

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

Public function Virtual Const

TOptional< F...

 

GetTimecode()

Get the sample timecode if available.

Overridden from IMediaPoolable

Name Description

Public function Virtual

void

 

ShutdownPoolable()

Called when the object added to the pool.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss