Developer Documentation

MicrophoneStream

Inherits from: MediaStream

public class MicrophoneStream : MediaStream, IDisposable

Representation of a write only audio stream

Public Methods

NameDescription
AudioStatsAudioReadData and AudioReadDataAsync are not supported!
AudioResetAudioReset is not supported!
AudioReadDataAudioReadData is not supported!
AudioReadDataTaskAudioReadDataTask is not supported!
AudioReadDataAsyncAudioReadDataAsync is not supported!

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