Interface AudioChunkEncoder

  • All Known Implementing Classes:
    OpusChunkEncoder, PcmChunkEncoder

    public interface AudioChunkEncoder
    Encodes one chunk of audio from internal PCM format.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Frees up all held resources.
      byte[] encode​(java.nio.ShortBuffer buffer)  
      void encode​(java.nio.ShortBuffer buffer, java.nio.ByteBuffer out)  
    • Method Detail

      • encode

        byte[] encode​(java.nio.ShortBuffer buffer)
        Parameters:
        buffer - Input buffer containing the PCM samples.
        Returns:
        Encoded bytes
      • encode

        void encode​(java.nio.ShortBuffer buffer,
                    java.nio.ByteBuffer out)
        Parameters:
        buffer - Input buffer containing the PCM samples.
        out - Output buffer to store the encoded bytes in
      • close

        void close()
        Frees up all held resources.