Table of Contents

Class AudioInStream

Namespace
Discord.Audio
Assembly
Discord.Net.Core.dll
public abstract class AudioInStream : AudioStream, IAsyncDisposable, IDisposable
Inheritance
AudioInStream
Implements
Derived
Inherited Members

Properties

AvailableFrames

public abstract int AvailableFrames { get; }

Property Value

int

CanRead

When overridden in a derived class, gets a value indicating whether the current stream supports reading.

public override bool CanRead { get; }

Property Value

bool

true if the stream supports reading; otherwise, false.

CanWrite

When overridden in a derived class, gets a value indicating whether the current stream supports writing.

public override bool CanWrite { get; }

Property Value

bool

true if the stream supports writing; otherwise, false.

Methods

FlushAsync(CancellationToken)

Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.

public override Task FlushAsync(CancellationToken cancelToken)

Parameters

cancelToken CancellationToken

Returns

Task

A task that represents the asynchronous flush operation.

Exceptions

ObjectDisposedException

The stream has been disposed.

ReadFrameAsync(CancellationToken)

public abstract Task<RTPFrame> ReadFrameAsync(CancellationToken cancelToken)

Parameters

cancelToken CancellationToken

Returns

Task<RTPFrame>

TryReadFrame(CancellationToken, out RTPFrame)

public abstract bool TryReadFrame(CancellationToken cancelToken, out RTPFrame frame)

Parameters

cancelToken CancellationToken
frame RTPFrame

Returns

bool