C# Class SwfDotNet.IO.Tags.SoundStreamHeadTag

SoundStreamHead tag defines the format of a streaming sound, identifying the encoding scheme, the rate at which the sound will be played and the size of the decoded samples.

The actual sound is streamed used the SoundStreamBlockTag class which contains the data for each frame in a movie.

Three encoded formats for the sound data are supported:

  • NATIVE_PCM - uncompressed Pulse Code Modulated: samples are either 1 or 2 bytes. For two-byte samples the byte order is dependent on the platform on which the Flash Player is hosted. Sounds created on a platform which supports big-endian byte order will not be played correctly when listened to on a platform which supports little-endian byte order.
  • PCM - uncompressed Pulse Code Modulated: samples are either 1 or 2 bytes with the latter presented in Little-Endian byte order. This ensures that sounds can be played across different platforms.
  • ADPCM - compressed ADaptive Pulse Code Modulated: samples are encoded and compressed by comparing the difference between successive sound sample which dramatically reduces the size of the encoded sound when compared to the uncompressed PCM formats. Use this format whenever possible.

When a stream 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. The different sets of attributes that identify how the sound will be played compared to the way it was encoded allows the Player more control over how the animation is rendered. Reducing the resolution or playback rate can improve synchronization with the frames displayed.

This tag was introduced in Flash 1.

Inheritance: BaseTag
Datei anzeigen Open project: bladecoding/SwfExport Class Usage Examples

Public Methods

Method Description
GetSizeOf ( ) : int

Gets the size of.

ReadData ( byte version, BufferedBinaryReader binaryReader ) : void

see base class

Serialize ( XmlWriter writer ) : void

Serializes the specified writer.

SoundStreamHeadTag ( ) : System

Creates a new SoundStreamHeadTag instance.

SoundStreamHeadTag ( uint playbackSoundRate, uint playbackSoundSize, uint playbackSoundType, uint streamSoundCompression, uint streamSoundRate, uint streamSoundSize, uint streamSoundType, ushort streamSoundSampleCount, short latencySeek ) : System

Creates a new SoundStreamHeadTag instance.

UpdateData ( byte version ) : void

see base class

Method Details

GetSizeOf() public method

Gets the size of.
public GetSizeOf ( ) : int
return int

ReadData() public method

see base class
public ReadData ( byte version, BufferedBinaryReader binaryReader ) : void
version byte
binaryReader SwfDotNet.IO.Utils.BufferedBinaryReader
return void

Serialize() public method

Serializes the specified writer.
public Serialize ( XmlWriter writer ) : void
writer System.Xml.XmlWriter Writer.
return void

SoundStreamHeadTag() public method

Creates a new SoundStreamHeadTag instance.
public SoundStreamHeadTag ( ) : System
return System

SoundStreamHeadTag() public method

Creates a new SoundStreamHeadTag instance.
public SoundStreamHeadTag ( uint playbackSoundRate, uint playbackSoundSize, uint playbackSoundType, uint streamSoundCompression, uint streamSoundRate, uint streamSoundSize, uint streamSoundType, ushort streamSoundSampleCount, short latencySeek ) : System
playbackSoundRate uint Playback sound rate.
playbackSoundSize uint Size of the playback sound.
playbackSoundType uint Playback sound type.
streamSoundCompression uint Stream sound compression.
streamSoundRate uint Stream sound rate.
streamSoundSize uint Size of the stream sound.
streamSoundType uint Stream sound type.
streamSoundSampleCount ushort Stream sound sample count.
latencySeek short Latency seek.
return System

UpdateData() public method

see base class
public UpdateData ( byte version ) : void
version byte
return void