pt.tumba.parser.swf
Class MP3Frame

java.lang.Object
  extended by pt.tumba.parser.swf.MP3Frame

public class MP3Frame
extends java.lang.Object

An MP3 sound data frame.

Author:
unknown

Field Summary
protected  int bit_rate
          Description of the Field
protected  int bitRate
          Description of the Field
static int CHANNEL_MODE_DUAL_CHANNEL
          Description of the Field
static int CHANNEL_MODE_JOINT_STEREO
          Description of the Field
static int CHANNEL_MODE_MONO
          Description of the Field
static int CHANNEL_MODE_STEREO
          Description of the Field
protected  int channelMode
          Description of the Field
protected  boolean copyrighted
          Description of the Field
protected  byte[] data
          Description of the Field
protected  int emphasis
          Description of the Field
static int EMPHASIS_50_15_MS
          Description of the Field
static int EMPHASIS_CCIT_J17
          Description of the Field
static int EMPHASIS_NONE
          Description of the Field
static int EMPHASIS_RESERVED
          Description of the Field
private static int FRAME_SAMPLES_MPEG_1
           
private static int FRAME_SAMPLES_MPEG_2
           
protected  boolean isProtected
          Description of the Field
protected  int modeExtension
          Description of the Field
static int MPEG_Layer_1
          Description of the Field
static int MPEG_Layer_2
          Description of the Field
static int MPEG_Layer_3
          Description of the Field
static int MPEG_Version_1
          Description of the Field
static int MPEG_Version_2
          Description of the Field
static int MPEG_Version_2_5
          Description of the Field
protected static int[] MPEG10SampleRates
          Description of the Field
protected static int[] MPEG1BitRates
          Description of the Field
protected static int[] MPEG20SampleRates
          Description of the Field
protected static int[] MPEG25SampleRates
          Description of the Field
protected static int[] MPEG2BitRates
          Description of the Field
protected  int mpegLayer
          Description of the Field
protected  int mpegVersion
          Description of the Field
protected  boolean original
          Description of the Field
protected  boolean padded
          Description of the Field
protected  int sample_rate
          Description of the Field
protected  int sampleRate
          Description of the Field
 
Constructor Summary
MP3Frame()
          Constructor for the MP3Frame object
 
Method Summary
 int getBitRate()
          Gets the bitRate attribute of the MP3Frame object
 int getDataLength()
          Gets the dataLength attribute of the MP3Frame object
 int getSampleRate()
          Gets the sampleRate attribute of the MP3Frame object
 int getSamplesPerFrame()
          Gets the samplesPerFrame attribute of the MP3Frame object
 boolean isStereo()
          Gets the stereo attribute of the MP3Frame object
static MP3Frame readFrame(java.io.InputStream in)
          Read the next MP3 frame from the stream - return null if no more
 java.lang.String toString()
          Description of the Method
 void write(java.io.OutputStream out)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MPEG_Version_2_5

public static final int MPEG_Version_2_5
Description of the Field

See Also:
Constant Field Values

MPEG_Version_2

public static final int MPEG_Version_2
Description of the Field

See Also:
Constant Field Values

MPEG_Version_1

public static final int MPEG_Version_1
Description of the Field

See Also:
Constant Field Values

MPEG_Layer_3

public static final int MPEG_Layer_3
Description of the Field

See Also:
Constant Field Values

MPEG_Layer_2

public static final int MPEG_Layer_2
Description of the Field

See Also:
Constant Field Values

MPEG_Layer_1

public static final int MPEG_Layer_1
Description of the Field

See Also:
Constant Field Values

CHANNEL_MODE_STEREO

public static final int CHANNEL_MODE_STEREO
Description of the Field

See Also:
Constant Field Values

CHANNEL_MODE_JOINT_STEREO

public static final int CHANNEL_MODE_JOINT_STEREO
Description of the Field

See Also:
Constant Field Values

CHANNEL_MODE_DUAL_CHANNEL

public static final int CHANNEL_MODE_DUAL_CHANNEL
Description of the Field

See Also:
Constant Field Values

CHANNEL_MODE_MONO

public static final int CHANNEL_MODE_MONO
Description of the Field

See Also:
Constant Field Values

EMPHASIS_NONE

public static final int EMPHASIS_NONE
Description of the Field

See Also:
Constant Field Values

EMPHASIS_50_15_MS

public static final int EMPHASIS_50_15_MS
Description of the Field

See Also:
Constant Field Values

EMPHASIS_RESERVED

public static final int EMPHASIS_RESERVED
Description of the Field

See Also:
Constant Field Values

EMPHASIS_CCIT_J17

public static final int EMPHASIS_CCIT_J17
Description of the Field

See Also:
Constant Field Values

MPEG1BitRates

protected static final int[] MPEG1BitRates
Description of the Field


MPEG2BitRates

protected static final int[] MPEG2BitRates
Description of the Field


MPEG10SampleRates

protected static final int[] MPEG10SampleRates
Description of the Field


MPEG20SampleRates

protected static final int[] MPEG20SampleRates
Description of the Field


MPEG25SampleRates

protected static final int[] MPEG25SampleRates
Description of the Field


FRAME_SAMPLES_MPEG_1

private static int FRAME_SAMPLES_MPEG_1

FRAME_SAMPLES_MPEG_2

private static int FRAME_SAMPLES_MPEG_2

mpegVersion

protected int mpegVersion
Description of the Field


mpegLayer

protected int mpegLayer
Description of the Field


isProtected

protected boolean isProtected
Description of the Field


bitRate

protected int bitRate
Description of the Field


sampleRate

protected int sampleRate
Description of the Field


padded

protected boolean padded
Description of the Field


channelMode

protected int channelMode
Description of the Field


modeExtension

protected int modeExtension
Description of the Field


copyrighted

protected boolean copyrighted
Description of the Field


original

protected boolean original
Description of the Field


emphasis

protected int emphasis
Description of the Field


data

protected byte[] data
Description of the Field


bit_rate

protected int bit_rate
Description of the Field


sample_rate

protected int sample_rate
Description of the Field

Constructor Detail

MP3Frame

public MP3Frame()
Constructor for the MP3Frame object

Method Detail

getBitRate

public int getBitRate()
Gets the bitRate attribute of the MP3Frame object

Returns:
The bitRate value

getSampleRate

public int getSampleRate()
Gets the sampleRate attribute of the MP3Frame object

Returns:
The sampleRate value

isStereo

public boolean isStereo()
Gets the stereo attribute of the MP3Frame object

Returns:
The stereo value

getDataLength

public int getDataLength()
Gets the dataLength attribute of the MP3Frame object

Returns:
The dataLength value

getSamplesPerFrame

public int getSamplesPerFrame()
Gets the samplesPerFrame attribute of the MP3Frame object

Returns:
The samplesPerFrame value

readFrame

public static MP3Frame readFrame(java.io.InputStream in)
                          throws java.io.IOException
Read the next MP3 frame from the stream - return null if no more

Parameters:
in - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

write

public void write(java.io.OutputStream out)
           throws java.io.IOException
Description of the Method

Parameters:
out - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

toString

public java.lang.String toString()
Description of the Method

Overrides:
toString in class java.lang.Object
Returns:
Description of the Return Value