class Opus::Encoder
- Opus::Encoder
- Reference
- Object
Defined in:
opus-crystal/encoder.crConstructors
-
.new(sample_rate : Int32, frame_size : Int32, channels : Int32)
Allocates memory for new encoder and initialize it.
Instance Method Summary
-
#bitrate=(value : Int32) : Int32
Configure bitrate.
-
#encode(data : Slice(Number)) : Bytes
Encodes data.
-
#finalize : Nil
Cleans up memory after encoder.
-
#input_length : Int32
Returns size of data which should be provided to
#encode
method in bytes. -
#reset : Nil
Resets the codec state.
-
#vbr_rate=(value : Int32) : Int32
Enables variable bitrate for encoder.
Constructor Detail
def self.new(sample_rate : Int32, frame_size : Int32, channels : Int32)
#
Allocates memory for new encoder and initialize it.