|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gameframe.sound.ULawEncoder
u-law, A-law and linear PCM conversions.
Field Summary | |
static int |
BIAS
Bias for linear code. |
static int |
NSEGS
Number of A-law segments. |
static int |
QUANT_MASK
Quantization field mask. |
static int |
SEG_MASK
Segment field mask. |
static int |
SEG_SHIFT
Left shift for segment number. |
static int |
SIGN_BIT
Sign bit for a A-law byte. |
private static int[] |
ULAW_ENCODE_SEGMENT_LUT
The u-law segment encoding look up table. |
Constructor Summary | |
ULawEncoder()
|
Method Summary | |
byte[] |
encode(short[] aOrigData)
Encodes the input value of linear PCM returns the results as either 8-bit u-law encoded array. |
(package private) byte |
linear2ulaw(short pcmValue)
Converts a linear PCM value to u-law. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int SIGN_BIT
public static final int QUANT_MASK
public static final int NSEGS
public static final int SEG_SHIFT
public static final int SEG_MASK
public static final int BIAS
private static final int[] ULAW_ENCODE_SEGMENT_LUT
Constructor Detail |
public ULawEncoder()
Method Detail |
public byte[] encode(short[] aOrigData)
aOrigData
- The array containing original data, one sample per array index.byte linear2ulaw(short pcmValue)
pcmValue
- PCM sample in 2's complement (16-bit range)
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |