Interface OpusEncoder


public interface OpusEncoder
Instances can be obtained by calling VoicechatApi.createEncoder().
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the encoder.
    byte[]
    encode(short[] rawAudio)
    Encodes 16 bit PCM audio with opus.
    boolean
     
    void
    Resets the encoders state.
  • 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.