Developer Documentation

MicrophoneStream

Inherits from: MediaStream

public class MicrophoneStream : MediaStream, IDisposable

Representation of a write only audio stream

Constructors

NameDescription
MicrophoneStream()
MicrophoneStream(OdinMediaConfig)

Properties

NameDescription
IsMuted

Public Methods

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

Inherited Properties

NameDescription
IdHandle ID
MediaConfigAudio config of the media stream
CancellationSourceControl of async read and write tasks
IsActiveIndicates wether or not the media stream is active and sending/receiving data
HasErrorsIndicates wether or not the last media stream api call result is an error code
IsInvalidIndicates 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