Developer Documentation

PlaybackStream

Inherits from: MediaStream

public class PlaybackStream : MediaStream, IDisposable

Representation of a read only audio stream

Public Methods

NameDescription
AudioPushDataAudioPushDataTask and AudioPushDataAsync are not supported!
AudioPushDataTaskAudioPushDataTask and AudioPushDataAsync are not supported!
AudioPushDataAsyncAudioPushDataTask and AudioPushDataAsync are not supported!
AudioResetThis operation resets the internal Opus encoder/decoder, ensuring a clean state. Additionally, it clears internal buffers, providing a fresh start.

Inherited Properties

NameTypeDescription
IdInt64Handle ID
MediaConfigOdinMediaConfigAudio config of the media stream
CancellationSourceCancellationTokenSourceControl of async read and write tasks
IsActiveBooleanIndicates wether or not the media stream is active and sending/receiving data
HasErrorsBooleanIndicates wether or not the last media stream api call result is an error code
IsInvalidBooleanIndicates wether or not the media stream handle is invalid or closed

Inherited Methods

NameDescription
GetMediaIdReturns the media stream ID and updates Id.
GetPeerIdReturns the ID of the peer that own this media stream.
AudioPushDataSends data to the audio stream. The data has to be interleaved [-1, 1] float data.
AudioPushDataTaskSends data to the audio stream. The data has to be interleaved [-1, 1] float data.
AudioPushDataAsyncSends audio data using a custom CancellationSource. The data has to be interleaved [-1, 1] float data.
AudioReset
AudioReadDataReads data from the audio stream.
AudioStatsRetrieves statistics for the specified Media.
AudioReadDataTaskReads data from the audio stream.
AudioReadDataAsyncRead audio data using a custom custom CancellationSource.
AudioResampleSet a resampler and resamples a chunk of audio.
CancelCancel the custom CancellationSource.
ToStringDebug
DisposeOn dispose will free the stream and resampler