Package ej.audio.format
Class G711AudioFormat
java.lang.Object
ej.audio.AudioFormat
ej.audio.format.G711AudioFormat
AudioFormat which represents the format of an audio sink with the G711 encoding.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intG711 ALAW encoding algorithm.static final intG711 ULAW encoding algorithm. -
Constructor Summary
ConstructorsConstructorDescriptionG711AudioFormat(int numChannels, int algorithm) Creates a G711 audio format. -
Method Summary
Modifier and TypeMethodDescriptionReturns the data format of an audio stream.int[]Returns the parameters of this audio format.
-
Field Details
-
ULAW_ALGORITHM
public static final int ULAW_ALGORITHMG711 ULAW encoding algorithm.- See Also:
-
ALAW_ALGORITHM
public static final int ALAW_ALGORITHMG711 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
Description copied from class:AudioFormatReturns the data format of an audio stream.- Specified by:
getEncodingin classAudioFormat- Returns:
- the encoding format string.
-
getParameters
public int[] getParameters()Description copied from class:AudioFormatReturns 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:
getParametersin classAudioFormat- Returns:
- the parameters.
-