DiscordVoiceStream

Properties

Name

Description

Type

Session

The parent session of this stream

DiscordVoiceSession

Methods

Write

Encodes and sends a buffer of audio data.

Parameters

Name

Description

Type

buffer

The buffer containing the audio data

byte[]

offset

The offset to start from

int

Returns

The current offset + 3840 (that's the amount of bytes opus will encode for a packet).

CopyFrom

Encodes and sends an entire buffer of audio data through the voice channel.

Parameters

Name

Description

Type

stream

The audio data stream

Stream

Parameters

Name

Description

Type

filePath

The path of the file to read and copy from

string

offset

The offset to start copying from

int?

Returns

Returns the last offset at which it copied from. If this is below buffer.Length, an error has occured.

Last updated