Our new developer documentation is now available. Please check it out!
PlaybackStream
Warning
Version 1.1.0 is deprecated and will be removed in the future and is not being supported for new users. Please update to the latest version as soon as possible.
Inherits from: MediaStream
public class PlaybackStream : MediaStream, IVideoStream, IAudioStream, IDisposable
Representation of a read only audio stream
Public Methods
Name | Description |
---|---|
AudioPushData | AudioPushDataTask and AudioPushDataAsync are not supported! |
AudioPushDataTask | AudioPushDataTask and AudioPushDataAsync are not supported! |
AudioPushDataAsync | AudioPushDataTask and AudioPushDataAsync are not supported! |
Inherited Properties
Name | Type | Description |
---|---|---|
Id | Int64 | Handle ID |
MediaConfig | OdinMediaConfig | Audio config of the media stream |
CancellationSource | CancellationTokenSource | Control of async read and write tasks |
IsPaused | Boolean | Indicates wether or not the media stream is paused |
IsMuted | Boolean | Indicates wether or not the media stream is muted |
IsActive | Boolean | Indicates wether or not the media stream is active and sending/receiving data |
HasErrors | Boolean | |
IsInvalid | Boolean |
Inherited Methods
Name | Description |
---|---|
GetMediaId | Returns the media stream ID and updates Id. |
GetPeerId | Returns the ID of the peer that own this media stream. |
SetPause | Sets IsPaused. |
TogglePause | Toggles IsPaused. |
SetMute | Sets IsMuted. |
ToggleMute | Toggles IsMuted. |
AudioPushData | Sends data to the audio stream. The data has to be interleaved [-1, 1] float data. |
AudioPushDataTask | Sends data to the audio stream. The data has to be interleaved [-1, 1] float data. |
AudioPushDataAsync | Sends audio data using a custom CancellationSource. The data has to be interleaved [-1, 1] float data. |
AudioReadData | Reads data from the audio stream. |
AudioReadDataTask | Reads data from the audio stream. |
AudioReadDataAsync | Read audio data using a custom custom CancellationSource. |
AudioDataLength | Get the number of samples available in the audio buffer. |
AudioResample | Set a resampler and resamples a chunk of audio. |
Cancel | Cancel the custom CancellationSource. |
ToString | Debug |
Dispose | On dispose will free the stream and resampler |