Skip to main content
Version: 21 Aug 2024

MLAudioPlayback

NameSpace: MagicLeap

Protected Fields

Instance


protected static MLAudioPlayback Instance { get; set; }


Public Methods

void CreateAudioBuffer

Creates the audio buffer with the default cache size.

public static void CreateAudioBuffer()

void CreateAudioBuffer

Creates the audio buffer with the specified cache size.

public static void CreateAudioBuffer(
uint cacheDurationInSeconds
)

Parameters

TypeNameDescription
uintcacheDurationInSeconds

void DestroyAudioBuffer

public static void DestroyAudioBuffer()

void SubmitBuffer

Submit unity audio buffers to the playback plugin so that it gets submitted to MLAudio apis.

public static void SubmitBuffer(
float [] data,
int channels
)

Parameters

TypeNameDescription
float []dataAudio buffer
intchannelsNumber of channels in the buffer