Discore
Show / Hide Table of Contents

Method SendVoiceData

| Improve this Doc View Source

SendVoiceData(byte[], int, int)

Queues the specified PCM bytes to be sent over this voice connection.

The size of the data should be equal to or less than PCM_BLOCK_SIZE. Should be used along-side CanSendVoiceData(int) to avoid overflowing the buffer.

This call will not block and users do not need to worry about calling this at a certain rate.

Does nothing if this connection is invalid.

Declaration
public void SendVoiceData(byte[] buffer, int offset, int count)
Parameters
Type Name Description
byte[] buffer
int offset
int count
Exceptions
Type Condition
ArgumentNullException
ArgumentOutOfRangeException

Thrown if the specified number of bytes will exceed the buffer size.

InvalidOperationException

Thrown if the voice connection is not fully connected yet. Checking CanSendVoiceData(int) first will avoid this.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX