|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.speech4j.sound.AudioBuffer
Chunk of audio data
| Constructor Summary | |
AudioBuffer()
|
|
| Method Summary | |
AudioBuffer |
convert(javax.sound.sampled.AudioFormat newFormat)
Converts the buffer to a new format |
byte[] |
getData()
Audio data |
javax.sound.sampled.AudioFormat |
getFormat()
Audio format of the buffer |
void |
load(java.lang.String fileName)
Reads an audio file to the buffer. |
void |
save(java.lang.String fileName)
Saves the buffer to a wav file. |
void |
setData(byte[] data)
Audio data |
void |
setFormat(javax.sound.sampled.AudioFormat format)
Audio format of the buffer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AudioBuffer()
| Method Detail |
public javax.sound.sampled.AudioFormat getFormat()
public void setFormat(javax.sound.sampled.AudioFormat format)
format - Audio formatpublic byte[] getData()
public void setData(byte[] data)
data - Audio data
public void load(java.lang.String fileName)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
fileName - File name
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
public void save(java.lang.String fileName)
throws java.io.FileNotFoundException,
java.io.IOException
fileName - File name
java.io.FileNotFoundException
java.io.IOException
public AudioBuffer convert(javax.sound.sampled.AudioFormat newFormat)
throws SoundException
newFormat - New format
SoundException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||