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
bufferbyte[]PCM data buffer to send.
offsetintStart of the data in the buffer.
countintNumber of bytes from the buffer.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
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
bufferReadOnlyMemory<byte>PCM data buffer to send.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.