|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SoundDecoder
SoundDecoder is an interface that classes used to decode different sound formats should implement in order to be registered with the SoundRegistry.
| Method Summary | |
|---|---|
DefineSound |
defineSound(int identifier)
Define an event sound. |
DefineSound |
defineSound(int identifier,
float duration)
Define an event sound. |
void |
read(File file)
Read a sound from a file. |
void |
read(InputStream stream)
Read a sound from an input stream. |
void |
read(URL url)
Read a sound from a file referenced by a URL. |
MovieTag |
streamHeader(float frameRate)
Generate the header for a streaming sound. |
MovieTag |
streamSound()
Generate a SoundStreamBlock with next set of sound samples. |
| Method Detail |
|---|
void read(File file)
throws IOException,
DataFormatException
file - the path to the file.
IOException - if there is an error reading the sound data.
DataFormatException - if the file contains an unsupported format.
void read(URL url)
throws IOException,
DataFormatException
url - the reference to the file.
IOException - if there is an error reading the sound data.
DataFormatException - if the file contains an unsupported format.
void read(InputStream stream)
throws IOException,
DataFormatException
stream - the stream used to read the sound data.
IOException - if there is an error reading the sound data.
DataFormatException - if the file contains an unsupported format.
DefineSound defineSound(int identifier)
throws IOException,
DataFormatException
identifier - he unique identifier that will be used to reference the
sound in a Movie.
IOException - if there is an error reading the sound data.
DataFormatException - if the file contains an unsupported format.
DefineSound defineSound(int identifier,
float duration)
throws IOException,
DataFormatException
identifier - the unique identifier that will be used to reference
the sound in a Movie.duration - the number of seconds to play the sound for.
IOException - if there is an error reading the sound data.
DataFormatException - if the file contains an unsupported format.MovieTag streamHeader(float frameRate)
frameRate - the frame rate for the movie so the sound can be divided
into sets of samples that can be played with each frame.
MovieTag streamSound()
throws IOException,
DataFormatException
IOException - if there is an error reading the sound data.
DataFormatException - if the file contains an unsupported format.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||