Modifier and Type | Field and Description |
---|---|
private static int |
BIAS |
private static int |
CLIP |
private static int[] |
exp_lut2 |
private static int[] |
expLut |
private static boolean |
ZEROTRAP |
Constructor and Description |
---|
WaveUtils() |
Modifier and Type | Method and Description |
---|---|
static short |
bytesToShort(byte hiByte,
byte loByte)
Reconstructs a short from its hi and low bytes.
|
static void |
main(String[] args)
Provides test program for method ulawToShort().
|
static byte |
shortToUlaw(short sampleData)
Converts a raw short to ulaw.
|
static short |
ulawToShort(short uByte)
Converts from ulaw to 16 bit linear.
|
private static int[] exp_lut2
private static final boolean ZEROTRAP
private static final int CLIP
private static final int BIAS
private static final int[] expLut
public WaveUtils()
public static final byte shortToUlaw(short sampleData)
sampleData
- signed 16-bit linear samplepublic static final short ulawToShort(short uByte)
Craig Reese: IDA/Supercomputing Research Center
29 September 1989
References:
1) CCITT Recommendation G.711 (very difficult to follow)
2) MIL-STD-188-113,"Interoperability and Performance Standards
for Analog-to_Digital Conversion Techniques," 17 February 1987
uByte
- 8 bit ulaw samplepublic static final short bytesToShort(byte hiByte, byte loByte)
hiByte
- the high byteloByte
- the low byteWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses