|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectaudio.AbstractCODEC
audio.AudioCodecUlaw
public class AudioCodecUlaw
Converts a 16-bit linear PCM stream from and to 8-bit u-law.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface audio.AudioInterface |
|---|
AudioInterface.Packetizer |
| Field Summary | |
|---|---|
private static short |
BIAS
|
private static int |
CLIP
|
private static int[] |
exp_lut1
|
private int |
sampleSize
|
private static short[] |
ulaw2lin_table
|
private static boolean |
ZEROTRAP
|
| Fields inherited from class audio.AbstractCODEC |
|---|
audio, inputPcmBuf, outputPcmBuf |
| Constructor Summary | |
|---|---|
AudioCodecUlaw(AudioInterfacePCM audio)
Constructs A-Law CODEC above existing PCM audio interface |
|
| Method Summary | |
|---|---|
void |
convertFromPCM(byte[] in,
byte[] out)
Decodes data from PCM, i.e. converts samples from u-Law to PCM format. |
void |
convertToPCM(byte[] in,
byte[] out)
Encodes data to PCM, i.e. converts samples from u-Law to CODEC format. |
int |
getSampleSize()
Returns the minimum sample size for use in creating buffers etc. |
int |
getVoicePduSubclass()
Gets the VoicePDU subclass attribute of the AbstractAudio object |
static byte |
linear2ulaw(int sample)
Converts a linear signed 16bit sample to a uLaw byte. |
static short |
ulaw2linear(byte ulawbyte)
Converts an 8-bit u-law value to 16-bit linear PCM |
| Methods inherited from class audio.AbstractCODEC |
|---|
cleanUp, getByFormat, readWithTimestamp, setAudioSender, startPlay, startRecording, startRinging, stopPlay, stopRecording, stopRinging, writeBuffered, writeDirectly |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int sampleSize
private static final boolean ZEROTRAP
private static final short BIAS
private static final int CLIP
private static final int[] exp_lut1
private static short[] ulaw2lin_table
| Constructor Detail |
|---|
public AudioCodecUlaw(AudioInterfacePCM audio)
| Method Detail |
|---|
public int getVoicePduSubclass()
getVoicePduSubclass in interface AudioInterfacegetVoicePduSubclass in class AbstractCODECpublic int getSampleSize()
public void convertToPCM(byte[] in,
byte[] out)
convertToPCM in class AbstractCODEC
public void convertFromPCM(byte[] in,
byte[] out)
convertFromPCM in class AbstractCODECpublic static byte linear2ulaw(int sample)
public static short ulaw2linear(byte ulawbyte)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||