Skip to main content
Version: 20 Mar 2024

AppDefinedAudioSource

Class that represents an app defined video source that can be used by the MLWebRTC API. More...

Inherits from:
AppDefinedSource,
Track

Detailed Description

public class AppDefinedAudioSource : AppDefinedSource 

Details*

Class that represents a source used by the MLWebRTC API.


Public Methods

override MLResult DestroyLocal

Destroys the Track and its associated media source.

public virtual override MLResult DestroyLocal()

Returns: MLResult.Result will be MLResult.Code.Ok if destroying all handles was successful. MLResult.Result will be MLResult.Code.WebRTCResultInstanceNotCreated if MLWebRTC instance was not created. MLResult.Result will be MLResult.Code.WebRTCResultMismatchingHandle if an incorrect handle was sent.

Reimplements: DestroyLocal


MLResult InitializeLocal

Initializes the given AppDefinedVideoSource object.

public static MLResult InitializeLocal(
AppDefinedAudioSource appDefinedAudioSource
)

Parameters

TypeNameDescription
AppDefinedAudioSourceappDefinedAudioSourceThe AppDefinedVideoSource object to initialize.
resultThe MLResult object of the inner platform call(s).

Returns: An AppDefinedVideoSource object with the given handle.


MLResult PushData

public MLResult PushData(
short [] audioBuffer,
in MLAudioOutput.BufferFormat audioBufferFormat
)

Parameters

TypeNameDescription
short []audioBuffer
in MLAudioOutput.BufferFormataudioBufferFormatBuffer format settings for input and output streams.

Protected Methods

AppDefinedAudioSource

protected AppDefinedAudioSource(
string trackId
)

Parameters

TypeNameDescription
stringtrackId