Discord Elixir v1.1.18 DiscordEx.Voice.Buffer View Source

Buffer Module for holding and reading audio.

Link to this section Summary

Functions

Drain the buffer based off the bit size and apply the result to the function - you don’t actually have to use time to make use of this

Drain the buffer which is assumed to contain just a DCA file with opus packets which have a header that dictate the size of a frame and the packets passed to the function

Dump everything out of the buffer

Read off of the buffer based on a set bit size

Read off of the buffer based on a set bit size and return the integer format

Get the size of the buffer

Create a new queue

Write to the buffer/queue binary data

Link to this section Functions

Link to this function drain(queue, size_in_bits, function, time \\ 0) View Source

Drain the buffer based off the bit size and apply the result to the function - you don’t actually have to use time to make use of this

Link to this function drain_dca(queue, function, time \\ 0) View Source
drain_dca(pid(), function(), integer()) :: binary()

Drain the buffer which is assumed to contain just a DCA file with opus packets which have a header that dictate the size of a frame and the packets passed to the function

Link to this function dump(queue) View Source
dump(pid()) :: atom()

Dump everything out of the buffer

Link to this function read(queue, size_in_bits) View Source
read(pid(), integer()) :: binary()

Read off of the buffer based on a set bit size

Link to this function read(queue, size_in_bits, atom) View Source
read(pid(), integer(), atom()) :: binary()

Read off of the buffer based on a set bit size and return the integer format

Link to this function size(queue) View Source
size(pid()) :: integer()

Get the size of the buffer

Link to this function start() View Source
start() :: pid()

Create a new queue

Link to this function write(queue, new_data) View Source
write(pid(), binary()) :: atom()

Write to the buffer/queue binary data