|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.tools.audio.AudioData
public class AudioData
Represents a 16bit, SIGNED_PCM, big endian audio clip with a sample rate specified by AudioFormat.
| Constructor Summary | |
|---|---|
AudioData()
No-arg constructor. |
|
AudioData(javax.sound.sampled.AudioInputStream ais)
Creates a new AudioData from the given AudioInputStream, converting the data to 16bit, big endian, SIGNED_PCM if needed. |
|
AudioData(short[] data,
float sampleRate)
Creates a new AudioData with the given data and sample rate. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
Add a ChangeListener. |
short[] |
getAudioData()
Gets the SIGNED_PCM 16 bit big endian audio data. |
javax.sound.sampled.AudioFormat |
getAudioFormat()
Gets the audio format. |
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
Remove a ChangeListener. |
void |
setAudioData(short[] data)
Sets the audio data and notifies all ChangeListeners. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AudioData()
public AudioData(short[] data,
float sampleRate)
data - the audio samples; one sample per element in the arraysampleRate - the sample rate in Hz
public AudioData(javax.sound.sampled.AudioInputStream ais)
throws java.io.IOException
ais - the AudioInputStream
java.io.IOException - if problems happen when reading from ais| Method Detail |
|---|
public short[] getAudioData()
public void setAudioData(short[] data)
data - the new SIGNED_PCM 16 bit big endian samplespublic javax.sound.sampled.AudioFormat getAudioFormat()
public void addChangeListener(javax.swing.event.ChangeListener listener)
listener - the listener to addpublic void removeChangeListener(javax.swing.event.ChangeListener listener)
listener - the listener to remove
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||