|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.util.sound.MP3Decoder
public final class MP3Decoder
Decoder for MP3 sounds so they can be added to a flash file.
| Constructor Summary | |
|---|---|
MP3Decoder()
|
|
| Method Summary | |
|---|---|
DefineSound |
defineSound(int identifier)
Define an event sound. |
DefineSound |
defineSound(int identifier,
float duration)
Define an event sound. |
SoundDecoder |
newDecoder()
The method implemented by all SoundDecoders in order to be registered with the SoundRegistry and used by the SoundFactory to decode sounds. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MP3Decoder()
| Method Detail |
|---|
public SoundDecoder newDecoder()
newDecoder in interface SoundProvider
public void read(File file)
throws IOException,
DataFormatException
read in interface SoundDecoderfile - the path to the file.
IOException - if there is an error reading the sound data.
DataFormatException - if the file contains an unsupported format.
public void read(URL url)
throws IOException,
DataFormatException
read in interface SoundDecoderurl - the reference to the file.
IOException - if there is an error reading the sound data.
DataFormatException - if the file contains an unsupported format.
public void read(InputStream stream)
throws IOException,
DataFormatException
read in interface SoundDecoderstream - 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.
public DefineSound defineSound(int identifier)
throws IOException,
DataFormatException
defineSound in interface SoundDecoderidentifier - 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.
public DefineSound defineSound(int identifier,
float duration)
throws IOException,
DataFormatException
defineSound in interface SoundDecoderidentifier - 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.public MovieTag streamHeader(float frameRate)
streamHeader in interface SoundDecoderframeRate - the frame rate for the movie so the sound can be divided
into sets of samples that can be played with each frame.
public MovieTag streamSound()
throws IOException,
DataFormatException
streamSound in interface SoundDecoderIOException - 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 | |||||||||