Package de.maxhenkel.voicechat.api.opus
Interface OpusEncoder
public interface OpusEncoder
Instances can be obtained by calling
NOTE: The bukkit based version of the voice chat does not include Opus natives.
VoicechatApi.createEncoder().
NOTE: The bukkit based version of the voice chat does not include Opus natives.
-
Method Details
-
encode
byte[] encode(short[] rawAudio)Encodes 16 bit PCM audio with opus.- Parameters:
rawAudio- the raw 16 bit PCM audio- Returns:
- the opus encoded data
-
resetState
void resetState()Resets the encoders state. -
isClosed
boolean isClosed()- Returns:
- if the encoder is closed
-
close
void close()Closes the encoder. Not doing this would result in a memory leak.
-