Class MediaStream
Base stream
Derived:
OdinNative.Odin.Media.MicrophoneStream, OdinNative.Odin.Media.PlaybackStream
Implements:
Global.IDisposable
Properties
Id
Handle ID
MediaConfig
Audio config of the media stream
CancellationSource
Control of async read and write tasks
IsActive
Indicates wether or not the media stream is active and sending/receiving data
HasErrors
Indicates wether or not the last media stream api call result is an error code
IsInvalid
Indicates wether or not the media stream handle is invalid or closed
Methods
GetMediaId()
Returns the media stream ID and updates OdinNative.Odin.Media.MediaStream.Id.
Returns
System.UInt16
: id value### GetPeerId()
Returns the ID of the peer that own this media stream.
Returns
System.UInt64
: id### AudioPushData(float[], int)
Sends data to the audio stream. The data has to be interleaved [-1, 1] float data.
Parameters
Type | Name | Description |
---|---|---|
System.Single[] | buffer | audio data |
System.Int32 | length | bytes to write |
AudioPushData(float[])
Sends data to the audio stream. The data has to be interleaved [-1, 1] float data.
Parameters
Type | Name | Description |
---|---|---|
System.Single[] | buffer | audio data |
AudioPushDataTask(float[], CancellationToken)
Sends data to the audio stream. The data has to be interleaved [-1, 1] float data.
Returns
Global.Task