Class G711AudioFormat


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

      • ULAW_ALGORITHM

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

        public static final int ALAW_ALGORITHM
        G711 ALAW encoding algorithm.
        See Also:
        Constant Field Values
    • Constructor Detail

      • 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 Detail

      • 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.