class

Opus::Encoder

Inherits Reference < Object

Constructors

new(sample_rate : Int32, frame_size : Int32, channels : Int32)

Allocates memory for new encoder and initialize it.

Source

Instance methods

bitrate=(value : Int32) : Int32

Configure bitrate.

Source
encode(data : Slice(Number)) : Bytes

Encodes data.

Source
finalize

Cleans up memory after encoder.

Source
input_length

Returns size of data which should be provided to #encode method in bytes.

Source
reset

Resets the codec state.

Source
vbr_rate=(value : Int32) : Int32

Enables variable bitrate for encoder.

Source