API reference
Method WriteAsync
- Namespace
- DisCatSharp.Voice.Entities
- Assembly
- DisCatSharp.Voice.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.