com.flagstone.transform.sound
Enum SoundFormat

java.lang.Object
  extended by java.lang.Enum<SoundFormat>
      extended by com.flagstone.transform.sound.SoundFormat
All Implemented Interfaces:
Serializable, Comparable<SoundFormat>

public enum SoundFormat
extends Enum<SoundFormat>

SoundFormat is used to identify the different encoding formats used for event and streaming sounds in Flash and Flash Video files.


Enum Constant Summary
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.
MP3
          Compressed MPEG Audio Layer-3.
NATIVE_PCM
          Uncompressed Pulse Code Modulated: samples are either 1 or 2 bytes.
NELLYMOSER
          Compressed Nellymoser Asao format supporting low bit-rate sound for improved synchronisation between the sound and frame rate of movies.
NELLYMOSER_8K
          Compressed Nellymoser Asao format for a mono sound played at 8KHz supporting low bit-rate sound for improved synchronisation between the sound and frame rate of movies.
PCM
          Uncompressed pulse code modulated sound.
SPEEX
          The Open Source SPEEX sound format.
 
Method Summary
static SoundFormat fromInt(int value)
          Get the SoundFormat represented by an encoded value.
 int getValue()
          Get the value used to represent the SoundFormat when it is encoded.
static SoundFormat valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SoundFormat[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NATIVE_PCM

public static final SoundFormat 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 support big-endian byte order will not be played correctly when listened to on a platform which supports little-endian byte order.


ADPCM

public static final SoundFormat 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 or MP3 whenever possible.


MP3

public static final SoundFormat MP3
Compressed MPEG Audio Layer-3.


PCM

public static final SoundFormat PCM
Uncompressed pulse code modulated sound. Samples are either 1 or 2 bytes. The byte ordering for 16-bit samples is little-endian.


NELLYMOSER_8K

public static final SoundFormat NELLYMOSER_8K
Compressed Nellymoser Asao format for a mono sound played at 8KHz supporting low bit-rate sound for improved synchronisation between the sound and frame rate of movies. This format is not supported in SWF files, only in Flash Video files.


NELLYMOSER

public static final SoundFormat NELLYMOSER
Compressed Nellymoser Asao format supporting low bit-rate sound for improved synchronisation between the sound and frame rate of movies. This format is for mono sounds.


SPEEX

public static final SoundFormat SPEEX
The Open Source SPEEX sound format.

Method Detail

values

public static SoundFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SoundFormat c : SoundFormat.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SoundFormat valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromInt

public static SoundFormat fromInt(int value)
Get the SoundFormat represented by an encoded value.

Parameters:
value - that represents the SoundFormat when encoded in a Flash file.
Returns:
the corresponding SoundFormat.

getValue

public int getValue()
Get the value used to represent the SoundFormat when it is encoded.

Returns:
the value used to encode the SoundFormat.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.