Class G711AudioFormat

java.lang.Object
ej.audio.AudioFormat
ej.audio.format.G711AudioFormat

public class G711AudioFormat extends AudioFormat
AudioFormat which represents the format of an audio sink with the G711 encoding.
  • Field Details

    • ULAW_ALGORITHM

      public static final int ULAW_ALGORITHM
      G711 ULAW encoding algorithm.
      See Also:
    • ALAW_ALGORITHM

      public static final int ALAW_ALGORITHM
      G711 ALAW encoding algorithm.
      See Also:
  • Constructor Details

    • G711AudioFormat

      public G711AudioFormat(int numChannels, int algorithm)
      Creates a G711 audio format.
      Parameters:
      numChannels - the number of channels.
      algorithm - the compression algorithm, 0: uLaw, 1:aLaw.
  • Method Details

    • getEncoding

      public String getEncoding()
      Description copied from class: AudioFormat
      Returns the data format of an audio stream.
      Specified by:
      getEncoding in class AudioFormat
      Returns:
      the encoding format string.
    • getParameters

      public int[] getParameters()
      Description copied from class: AudioFormat
      Returns the parameters of this audio format.

      The parameters depend on the encoding. The semantics of every parameter is known by the low-level audio implementation.

      Specified by:
      getParameters in class AudioFormat
      Returns:
      the parameters.