public class AudioChannelFormat extends java.lang.Object implements java.io.Serializable, ChannelFormat
Modifier and Type | Field and Description |
---|---|
static int |
A_LAW
The A_LAW format for audio.
|
java.lang.String |
channelName
The name for this channel
|
int |
encoding
The encoding for this piece of audio e.g.
|
static int |
GSM
The A_LAW format for audio.
|
static int |
PCM
The PCM (pulse-code modulation) format for audio.
|
static int |
PCM_UNSIGNED
The PCM (pulse-code modulation) format for audio.
|
short |
sampleSize
The sampling size specified in bits.
|
int |
samplingRate
The sampling rate specified as a integer.
|
static int |
U_LAW
The A_LAW format for audio.
|
Constructor and Description |
---|
AudioChannelFormat()
Creates an AudioChannelFormat Object with default values
|
AudioChannelFormat(AudioChannelFormat au)
Creates an AudioChannelFormat from the given AudioChannelFormat Object.
|
AudioChannelFormat(javax.sound.sampled.AudioFormat au)
Creates an AudioChannelFormat from the given javax.sound.sampled AudioFormat Object.
|
AudioChannelFormat(int srate,
short sampSize)
Creates an AudioChannelFormat Object with a given sampling rate and sample size (in bits) It formats the audio to
the default PCM, names the chanel Audio.
|
AudioChannelFormat(int srate,
short sampSize,
int format)
Creates an AudioChannelFormat Object with a given sampling rate, sample size and format for this audio.
|
AudioChannelFormat(int srate,
short sampSize,
int format,
java.lang.String channelName)
Creates an AudioChannelFormat Object with a given sampling rate, sample size, format for this audio and a name
for this channel
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
javax.sound.sampled.AudioFormat |
getAudioFormat()
Gets a Javax.sound.sampled AudioFormat Object from this format
|
static javax.sound.sampled.AudioFormat.Encoding |
getAudioFormatEncoding(int encoding)
translates between the AudioChannelFormat (our format) and the AudioFormat Object in java sound.
|
java.lang.String |
getChannelName() |
int |
getEncoding() |
static int |
getEncoding(javax.sound.sampled.AudioFormat.Encoding encoding)
translates between the AudioChannelFormat (our format) and the AudioFormat Object in java sound.
|
short |
getSampleSize() |
int |
getSampleSizeInBytes() |
int |
getSamplingRate() |
void |
setFromString(java.lang.String str)
Initialises this AudioChannelFormat object from the given string
|
java.lang.String |
toString() |
public static final int PCM
public static final int PCM_UNSIGNED
public static final int U_LAW
public static final int A_LAW
public static final int GSM
public int samplingRate
public short sampleSize
public java.lang.String channelName
public int encoding
public AudioChannelFormat()
public AudioChannelFormat(int srate, short sampSize)
public AudioChannelFormat(int srate, short sampSize, int format)
public AudioChannelFormat(int srate, short sampSize, int format, java.lang.String channelName)
public AudioChannelFormat(AudioChannelFormat au)
public AudioChannelFormat(javax.sound.sampled.AudioFormat au)
public javax.sound.sampled.AudioFormat getAudioFormat()
public static javax.sound.sampled.AudioFormat.Encoding getAudioFormatEncoding(int encoding)
public static int getEncoding(javax.sound.sampled.AudioFormat.Encoding encoding)
public java.lang.String getChannelName()
getChannelName
in interface ChannelFormat
public int getSamplingRate()
getSamplingRate
in interface ChannelFormat
public short getSampleSize()
public int getEncoding()
public int getSampleSizeInBytes()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in interface ChannelFormat
toString
in class java.lang.Object
public void setFromString(java.lang.String str)
setFromString
in interface ChannelFormat