Constructor
new OpusEncoder(rate, channels)
Parameters:
Name | Type | Description |
---|---|---|
rate |
Number | The sample rate |
channels |
Number | The number of channels |
Methods
decode(dataopt) → {NativeFunction.<Buffer.<PCM>>}
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>>}
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>>