OpusEncoder

opus. OpusEncoder

An Opus Encoder and Decoder

Constructor

new OpusEncoder(rate, channels)

Source:
Parameters:
Name Type Description
rate Number

The sample rate

channels Number

The number of channels

Methods

decode(dataopt) → {NativeFunction.<Buffer.<PCM>>}

Source:
Parameters:
Name Type Attributes Description
data Buffer.<Opus> <optional>

The input opus data, may be undefined if piping from another NativeFunction

Returns:
  • A native function to be run with a Chain
Type
NativeFunction.<Buffer.<PCM>>

encode(dataopt) → {NativeFunction.<Buffer.<Opus>>}

Source:
Parameters:
Name Type Attributes Description
data Buffer.<PCM> <optional>

The input pcm data, may be undefined if piping from another NativeFunction

Returns:
  • A native function to be run with a Chain
Type
NativeFunction.<Buffer.<Opus>>