Table of Contents

Method WriteAsync

Namespace
DSharpPlus.VoiceNext
Assembly
DSharpPlus.VoiceNext.dll

WriteAsync(byte[], int, int, CancellationToken)

Writes PCM data to the sink. The data is prepared for transmission, and enqueued.

public Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)

Parameters

buffer byte[]

PCM data buffer to send.

offset int

Start of the data in the buffer.

count int

Number of bytes from the buffer.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

WriteAsync(ReadOnlyMemory<byte>, CancellationToken)

Writes PCM data to the sink. The data is prepared for transmission, and enqueued.

public Task WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)

Parameters

buffer ReadOnlyMemory<byte>

PCM data buffer to send.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task