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
intStart of the data in the buffer.
count
intNumber of bytes from the buffer.
cancellationToken
CancellationTokenThe 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
buffer
ReadOnlyMemory<byte>PCM data buffer to send.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.