NativeBindings
Native bindings for the MLWebRTC.AppDefinedAudioSource class.
Inherits from:
MagicLeapNativeBindings
Public Methods
MLResult.Code InitializeAppDefinedAudioSource
Initialized a given AppDefinedAudioSource object and sets it's callbacks.
public static MLResult.Code InitializeAppDefinedAudioSource(
MLWebRTC.AppDefinedAudioSource appDefinedAudioSource
)
Parameters
Type | Name | Description |
---|---|---|
MLWebRTC.AppDefinedAudioSource | appDefinedAudioSource | The AppDefinedAudioSource object to initialize. |
Returns: MLResult.Result will be MLResult.Code.Ok if the connection was successfully created. MLResult.Result will be MLResult.Code.PermissionDenied if necessary permission is missing. MLResult.Result will be MLResult.Code.UnspecifiedFailure if failed due to other internal error.
MLResult.Code MLWebRTCSourceAppDefinedAudioSourcePushData
Creates the local source that links to the user's camera and mic.
public MLResult.Code MLWebRTCSourceAppDefinedAudioSourcePushData(
ulong sourceHandle,
in MLAudioOutput.NativeBindings.MLAudioBuffer audioBuffer,
in MLAudioOutput.NativeBindings.MLAudioBufferFormat audioBufferFormat
)
Parameters
Type | Name | Description |
---|---|---|
ulong | sourceHandle | The handle to the local source to return to the caller. |
in MLAudioOutput.NativeBindings.MLAudioBuffer | audioBuffer | |
in MLAudioOutput.NativeBindings.MLAudioBufferFormat | audioBufferFormat |
Returns: MLResult.Result will be MLResult.Code.Ok if the local source was successfully created. MLResult.Result will be MLResult.Code.PermissionDenied if necessary permission is missing. MLResult.Result will be MLResult.Code.UnspecifiedFailure if failed due to other internal error.
MLResult.Code PushData
public static MLResult.Code PushData(
ulong sourceHandle,
byte [] audioBuffer,
in MLAudioOutput.BufferFormat audioBufferFormat
)
Parameters
Type | Name | Description |
---|---|---|
ulong | sourceHandle | |
byte [] | audioBuffer | |
in MLAudioOutput.BufferFormat | audioBufferFormat | Buffer format settings for input and output streams. |
MLResult.Code PushData
public static MLResult.Code PushData(
ulong sourceHandle,
float [] audioBuffer,
in MLAudioOutput.BufferFormat audioBufferFormat
)
Parameters
Type | Name | Description |
---|---|---|
ulong | sourceHandle | |
float [] | audioBuffer | |
in MLAudioOutput.BufferFormat | audioBufferFormat | Buffer format settings for input and output streams. |