gameframe.sound
Class ULawEncoder
java.lang.Object
|
+--gameframe.sound.ULawEncoder
- public class ULawEncoder
- extends java.lang.Object
u-law, A-law and linear PCM conversions.
- Since:
- GameFrame for Java 0.9
- Version:
- GameFrame for Java 0.9.4
- Author:
- Pasi Keränen 16. May 1999
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. |
Method Summary |
byte[] |
encode(short[] aOrigData)
Encodes the input value of linear PCM returns the results as
either 8-bit u-law encoded array. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SIGN_BIT
public static final int SIGN_BIT
- Sign bit for a A-law byte.
QUANT_MASK
public static final int QUANT_MASK
- Quantization field mask.
NSEGS
public static final int NSEGS
- Number of A-law segments.
SEG_SHIFT
public static final int SEG_SHIFT
- Left shift for segment number.
SEG_MASK
public static final int SEG_MASK
- Segment field mask.
BIAS
public static final int BIAS
- Bias for linear code.
ULawEncoder
public ULawEncoder()
encode
public byte[] encode(short[] aOrigData)
- Encodes the input value of linear PCM returns the results as
either 8-bit u-law encoded array.
- Parameters:
aOrigData
- The array containing original data, one sample per array index.