javax.media.format
Class AudioFormat

java.lang.Object
  extended by javax.media.Format
      extended by javax.media.format.AudioFormat
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class AudioFormat
extends Format

Standard JMF class -- see this class in the JMF Javadoc. Coding complete.

Author:
Ken Larson
See Also:
Serialized Form

Field Summary
static java.lang.String ALAW
           
static int BIG_ENDIAN
           
protected  int channels
           
static java.lang.String DOLBYAC3
           
static java.lang.String DVI
           
static java.lang.String DVI_RTP
           
protected  int endian
           
protected  double frameRate
           
protected  int frameSizeInBits
           
static java.lang.String G723
           
static java.lang.String G723_RTP
           
static java.lang.String G728
           
static java.lang.String G728_RTP
           
static java.lang.String G729
           
static java.lang.String G729_RTP
           
static java.lang.String G729A
           
static java.lang.String G729A_RTP
           
static java.lang.String GSM
           
static java.lang.String GSM_MS
           
static java.lang.String GSM_RTP
           
static java.lang.String IMA4
           
static java.lang.String IMA4_MS
           
static java.lang.String LINEAR
           
static int LITTLE_ENDIAN
           
static java.lang.String MAC3
           
static java.lang.String MAC6
           
static java.lang.String MPEG
           
static java.lang.String MPEG_RTP
           
static java.lang.String MPEGLAYER3
           
static java.lang.String MSADPCM
           
static java.lang.String MSNAUDIO
           
static java.lang.String MSRT24
           
protected  double sampleRate
           
protected  int sampleSizeInBits
           
protected  int signed
           
static int SIGNED
           
static java.lang.String TRUESPEECH
           
static java.lang.String ULAW
           
static java.lang.String ULAW_RTP
           
static int UNSIGNED
           
static java.lang.String VOXWAREAC10
           
static java.lang.String VOXWAREAC16
           
static java.lang.String VOXWAREAC20
           
static java.lang.String VOXWAREAC8
           
static java.lang.String VOXWAREMETASOUND
           
static java.lang.String VOXWAREMETAVOICE
           
static java.lang.String VOXWARERT29H
           
static java.lang.String VOXWARETQ40
           
static java.lang.String VOXWARETQ60
           
static java.lang.String VOXWAREVR12
           
static java.lang.String VOXWAREVR18
           
 
Fields inherited from class javax.media.Format
byteArray, clz, dataType, encoding, FALSE, formatArray, intArray, NOT_SPECIFIED, shortArray, TRUE
 
Constructor Summary
AudioFormat(java.lang.String encoding)
           
AudioFormat(java.lang.String encoding, double sampleRate, int sampleSizeInBits, int channels)
           
AudioFormat(java.lang.String encoding, double sampleRate, int sampleSizeInBits, int channels, int endian, int signed)
           
AudioFormat(java.lang.String encoding, double sampleRate, int sampleSizeInBits, int channels, int endian, int signed, int frameSizeInBits, double frameRate, java.lang.Class dataType)
           
 
Method Summary
 java.lang.Object clone()
           
 long computeDuration(long length)
           
protected  void copy(Format f)
           
 boolean equals(java.lang.Object format)
           
 int getChannels()
           
 int getEndian()
           
 double getFrameRate()
           
 int getFrameSizeInBits()
           
 double getSampleRate()
           
 int getSampleSizeInBits()
           
 int getSigned()
           
 Format intersects(Format other)
           
 boolean matches(Format format)
           
 java.lang.String toString()
           
 
Methods inherited from class javax.media.Format
getDataType, getEncoding, isSameEncoding, isSameEncoding, relax
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BIG_ENDIAN

public static final int BIG_ENDIAN
See Also:
Constant Field Values

LITTLE_ENDIAN

public static final int LITTLE_ENDIAN
See Also:
Constant Field Values

SIGNED

public static final int SIGNED
See Also:
Constant Field Values

UNSIGNED

public static final int UNSIGNED
See Also:
Constant Field Values

sampleRate

protected double sampleRate

sampleSizeInBits

protected int sampleSizeInBits

channels

protected int channels

endian

protected int endian

signed

protected int signed

frameRate

protected double frameRate

frameSizeInBits

protected int frameSizeInBits

LINEAR

public static final java.lang.String LINEAR
See Also:
Constant Field Values

ULAW

public static final java.lang.String ULAW
See Also:
Constant Field Values

ULAW_RTP

public static final java.lang.String ULAW_RTP
See Also:
Constant Field Values

ALAW

public static final java.lang.String ALAW
See Also:
Constant Field Values

IMA4

public static final java.lang.String IMA4
See Also:
Constant Field Values

IMA4_MS

public static final java.lang.String IMA4_MS
See Also:
Constant Field Values

MSADPCM

public static final java.lang.String MSADPCM
See Also:
Constant Field Values

DVI

public static final java.lang.String DVI
See Also:
Constant Field Values

DVI_RTP

public static final java.lang.String DVI_RTP
See Also:
Constant Field Values

G723

public static final java.lang.String G723
See Also:
Constant Field Values

G723_RTP

public static final java.lang.String G723_RTP
See Also:
Constant Field Values

G728

public static final java.lang.String G728
See Also:
Constant Field Values

G728_RTP

public static final java.lang.String G728_RTP
See Also:
Constant Field Values

G729

public static final java.lang.String G729
See Also:
Constant Field Values

G729_RTP

public static final java.lang.String G729_RTP
See Also:
Constant Field Values

G729A

public static final java.lang.String G729A
See Also:
Constant Field Values

G729A_RTP

public static final java.lang.String G729A_RTP
See Also:
Constant Field Values

GSM

public static final java.lang.String GSM
See Also:
Constant Field Values

GSM_MS

public static final java.lang.String GSM_MS
See Also:
Constant Field Values

GSM_RTP

public static final java.lang.String GSM_RTP
See Also:
Constant Field Values

MAC3

public static final java.lang.String MAC3
See Also:
Constant Field Values

MAC6

public static final java.lang.String MAC6
See Also:
Constant Field Values

TRUESPEECH

public static final java.lang.String TRUESPEECH
See Also:
Constant Field Values

MSNAUDIO

public static final java.lang.String MSNAUDIO
See Also:
Constant Field Values

MPEGLAYER3

public static final java.lang.String MPEGLAYER3
See Also:
Constant Field Values

VOXWAREAC8

public static final java.lang.String VOXWAREAC8
See Also:
Constant Field Values

VOXWAREAC10

public static final java.lang.String VOXWAREAC10
See Also:
Constant Field Values

VOXWAREAC16

public static final java.lang.String VOXWAREAC16
See Also:
Constant Field Values

VOXWAREAC20

public static final java.lang.String VOXWAREAC20
See Also:
Constant Field Values

VOXWAREMETAVOICE

public static final java.lang.String VOXWAREMETAVOICE
See Also:
Constant Field Values

VOXWAREMETASOUND

public static final java.lang.String VOXWAREMETASOUND
See Also:
Constant Field Values

VOXWARERT29H

public static final java.lang.String VOXWARERT29H
See Also:
Constant Field Values

VOXWAREVR12

public static final java.lang.String VOXWAREVR12
See Also:
Constant Field Values

VOXWAREVR18

public static final java.lang.String VOXWAREVR18
See Also:
Constant Field Values

VOXWARETQ40

public static final java.lang.String VOXWARETQ40
See Also:
Constant Field Values

VOXWARETQ60

public static final java.lang.String VOXWARETQ60
See Also:
Constant Field Values

MSRT24

public static final java.lang.String MSRT24
See Also:
Constant Field Values

MPEG

public static final java.lang.String MPEG
See Also:
Constant Field Values

MPEG_RTP

public static final java.lang.String MPEG_RTP
See Also:
Constant Field Values

DOLBYAC3

public static final java.lang.String DOLBYAC3
See Also:
Constant Field Values
Constructor Detail

AudioFormat

public AudioFormat(java.lang.String encoding)

AudioFormat

public AudioFormat(java.lang.String encoding,
                   double sampleRate,
                   int sampleSizeInBits,
                   int channels)

AudioFormat

public AudioFormat(java.lang.String encoding,
                   double sampleRate,
                   int sampleSizeInBits,
                   int channels,
                   int endian,
                   int signed)

AudioFormat

public AudioFormat(java.lang.String encoding,
                   double sampleRate,
                   int sampleSizeInBits,
                   int channels,
                   int endian,
                   int signed,
                   int frameSizeInBits,
                   double frameRate,
                   java.lang.Class dataType)
Method Detail

getSampleRate

public double getSampleRate()

getSampleSizeInBits

public int getSampleSizeInBits()

getChannels

public int getChannels()

getEndian

public int getEndian()

getSigned

public int getSigned()

getFrameSizeInBits

public int getFrameSizeInBits()

getFrameRate

public double getFrameRate()

computeDuration

public long computeDuration(long length)

toString

public java.lang.String toString()
Overrides:
toString in class Format

equals

public boolean equals(java.lang.Object format)
Overrides:
equals in class Format

matches

public boolean matches(Format format)
Overrides:
matches in class Format

intersects

public Format intersects(Format other)
Overrides:
intersects in class Format

clone

public java.lang.Object clone()
Overrides:
clone in class Format

copy

protected void copy(Format f)
Overrides:
copy in class Format