|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.flagstone.transform.FSVideoObject
com.flagstone.transform.FSAudioData
public final class FSAudioData
FSAudioData is used to define sounds for a Flash Video (flv) file. It is similar in function to the FSDefineSound class.
| Attributes | |
|---|---|
| timestamp | The time in milliseconds at which the sound will be played. The timestamp is used exclusively for determining when sound or video will be played. Any internal timing information in the audio or video data is ignored. |
| format | The format of the sound data - PCM, ADPCM, MP3, NATIVE_PCM or NELLYMOSER. |
| playbackRate | The rate the sound will be played in Hertz: 5512, 11025, 22050 or 44100. Note: sounds encoded using the Nellymoser have a fixed playback rate of 8KHz. |
| playbackChannels | The number of channels in the sound, typically 1 (mono) or 2 (stereo). |
| playbackSampleSize | The number of bytes in a sample: 1 or 2. |
| sound | The sampled sound data. |
| Field Summary |
|---|
| Fields inherited from class com.flagstone.transform.FSVideoObject |
|---|
AudioData, length, MetaData, timestamp, type, VideoData |
| Constructor Summary | |
|---|---|
FSAudioData(int timestamp,
int aFormat,
int rate,
int channels,
int sampleSize,
byte[] bytes)
Constructs an FSAudioData object specifying the parameters required to describe the sound. |
|
| Method Summary | |
|---|---|
void |
appendDescription(java.lang.StringBuffer buffer,
int depth)
|
java.lang.Object |
clone()
Creates a deep copy of the entire object. |
boolean |
equals(java.lang.Object anObject)
|
int |
getFormat()
Gets the compression format used, either FSSound.NATIVE_PCM, FSSound.PCM, FSSound.ADPCM, FSSound.MP3 or FSSound.NELLYMOSER. |
int |
getPlaybackChannels()
Gets the number of sound channels, 1 (Mono) or 2 (Stereo). |
int |
getPlaybackRate()
Gets the rate at which the sound will be played, in Hertz: 5512, 11025, 22050 or 44100. |
int |
getPlaybackSampleSize()
Gets the size of an uncompressed sample in bytes. |
byte[] |
getSoundData()
Gets the sound data. |
void |
setFormat(int encoding)
Sets the encoding format used, either FSSound.NATIVE_PCM, FSSound.PCM, FSSound.ADPCM, FSSound.MP3 or FSSound.NELLYMOSER. |
void |
setPlaybackChannels(int channels)
Sets the number of channels defined in the sound. |
void |
setPlaybackRate(int rate)
Sets the sampling rate in Hertz. |
void |
setPlaybackSampleSize(int sampleSize)
Sets the sample size in bytes. |
void |
setSoundData(byte[] bytes)
Sets the sound data. |
| Methods inherited from class com.flagstone.transform.FSVideoObject |
|---|
getTimestamp, getType, name, setTimestamp |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FSAudioData(int timestamp,
int aFormat,
int rate,
int channels,
int sampleSize,
byte[] bytes)
timestamp - time in milliseconds from the start of the file that the
sound will be played..aFormat - the encoding format for the sound, either FSSound.NATIVE_PCM,
FSSound.PCM, FSSound.ADPCM, FSSound.MP3 or FSSound.NELLYMOSER.rate - the number of samples per second that the sound is played at,
either 5512, 11025, 22050 or 44100.channels - the number of channels in the sound, either 1 (Mono) or
2 (Stereo).sampleSize - the size of an uncompressed sound sample in bits,
either 8 or 16.bytes - the sound data.| Method Detail |
|---|
public int getFormat()
public void setFormat(int encoding)
encoding - the format for the sound.public int getPlaybackRate()
public void setPlaybackRate(int rate)
rate - the rate at which the sounds is played in Hz.public int getPlaybackChannels()
public void setPlaybackChannels(int channels)
channels - the number of channels in the sound, either 1 (Mono) or
2 (Stereo).public int getPlaybackSampleSize()
public void setPlaybackSampleSize(int sampleSize)
sampleSize - the size of sound samples in bytes.public byte[] getSoundData()
public void setSoundData(byte[] bytes)
bytes - the sound data.public java.lang.Object clone()
FSVideoObject
clone in class FSVideoObjectpublic boolean equals(java.lang.Object anObject)
equals in class FSVideoObject
public void appendDescription(java.lang.StringBuffer buffer,
int depth)
appendDescription in class FSVideoObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||