public class ALawEncoderUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX |
Constructor and Description |
---|
ALawEncoderUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
aLawEncode(boolean bigEndian,
byte[] data,
int offset,
int length,
byte[] target)
Encode an array of pcm values into a pre-allocated target array
|
static byte |
aLawEncode(int pcm)
Encode a pcm value into a a-law byte
|
static byte |
aLawEncode(short pcm)
Encode a pcm value into a a-law byte
|
static void |
aLawEncodeBigEndian(byte[] data,
int offset,
int length,
byte[] target) |
static void |
aLawEncodeLittleEndian(byte[] data,
int offset,
int length,
byte[] target) |
public static final int MAX
public static byte aLawEncode(int pcm)
pcm
- A 16-bit pcm valuepublic static byte aLawEncode(short pcm)
pcm
- A 16-bit pcm valuepublic static void aLawEncode(boolean bigEndian, byte[] data, int offset, int length, byte[] target)
data
- An array of bytes in Little-Endian formattarget
- A pre-allocated array to receive the A-law bytes. This array must be at least half the size of the source.public static void aLawEncodeLittleEndian(byte[] data, int offset, int length, byte[] target)
public static void aLawEncodeBigEndian(byte[] data, int offset, int length, byte[] target)