Package de.maxhenkel.voicechat.api.opus
Interface OpusEncoder
public interface OpusEncoder
Instances can be obtained by calling
VoicechatApi.createEncoder()
.-
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.
-