|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.sound.SoundStreamBlock
public final class SoundStreamBlock
SoundStreamBlock contains the sound data being streamed to the Flash Player.
Streaming sounds are played in tight synchronisation with one SoundStreamBlock object defining the sound for each frame displayed in a movie. When a streaming sound is played if the Flash Player cannot render the frames fast enough to maintain synchronisation with the sound being played then frames will be skipped. Normally the player will reduce the frame rate so every frame of a movie is played.
SoundStreamHead
,
SoundStreamHead2
Constructor Summary | |
---|---|
SoundStreamBlock(byte[] bytes)
Creates a SoundStreamBlock specifying the sound data in the format defined by a preceding SoundStreamHead or SoundStreamHead2 object. |
|
SoundStreamBlock(SoundStreamBlock object)
Creates and initialises a SoundStreamBlock object using the values copied from another SoundStreamBlock object. |
|
SoundStreamBlock(SWFDecoder coder)
Creates and initialises a SoundStreamBlock object using values encoded in the Flash binary format. |
Method Summary | |
---|---|
SoundStreamBlock |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
byte[] |
getSound()
Get a copy of the sound data in the format defined by a preceding SoundStreamHead or SoundStreamHead2 object. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setSound(byte[] bytes)
Sets the sound data. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SoundStreamBlock(SWFDecoder coder) throws IOException
coder
- an SWFDecoder object that contains the encoded Flash data.
IOException
- if an error occurs while decoding the data.public SoundStreamBlock(byte[] bytes)
bytes
- a list of bytes containing the sound data. Must not be null.public SoundStreamBlock(SoundStreamBlock object)
object
- a SoundStreamBlock object from which the values will be
copied.Method Detail |
---|
public byte[] getSound()
public void setSound(byte[] bytes)
bytes
- a list of bytes containing the sound data. Must not be null.public SoundStreamBlock copy()
copy
in interface Copyable<MovieTag>
public String toString()
toString
in class Object
public int prepareToEncode(Context context)
prepareToEncode
in interface SWFEncodeable
context
- an Context that allows information to be passed between
objects to control how they are initialised for encoding.
public void encode(SWFEncoder coder, Context context) throws IOException
encode
in interface SWFEncodeable
coder
- an SWFEncoder object.context
- an Context that allows information to be passed between
objects to control how they are initialised for encoding.
IOException
- if an error occurs while encoding the object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |