public class PcmAudioFormat extends AudioFormat
AudioFormat
which represents data with the PCM (Pulse-Code Modulation) encoding.Constructor and Description |
---|
PcmAudioFormat(int sampleRate,
int numChannels,
int bitDepth,
boolean isBigEndian,
boolean isSigned)
Creates a PCM audio format.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getEncoding()
Returns the encoding of this audio format.
|
protected int[] |
getParameters()
Returns the parameters of this audio format.
|
public PcmAudioFormat(int sampleRate, int numChannels, int bitDepth, boolean isBigEndian, boolean isSigned)
sampleRate
- the sample rate (in Hz).numChannels
- the number of channels.bitDepth
- the bit depth (the number of bits per sample).isBigEndian
- whether the data is in big endian or in little endian.isSigned
- whether the data is signed or unsigned.IllegalArgumentException
- if the given sample rate, the given number of channels or the given bit depth is less than or equal
to zero.protected String getEncoding()
AudioFormat
getEncoding
in class AudioFormat
protected int[] getParameters()
AudioFormat
The parameters depend on the encoding. The semantics of every parameter is known by the low-level audio implementation.
getParameters
in class AudioFormat