org.mobicents.media.server.spi.format
Class AudioFormat

java.lang.Object
  extended by org.mobicents.media.server.spi.format.Format
      extended by org.mobicents.media.server.spi.format.AudioFormat
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
DTMFFormat

public class AudioFormat
extends Format
implements Cloneable

Descriptor for audio format.

Author:
kulikov

Constructor Summary
protected AudioFormat(EncodingName name)
          Creates new audio format descriptor.
 
Method Summary
 AudioFormat clone()
           
 int getChannels()
          Gets the number of channels.
 int getSampleRate()
          Gets the sampling rate.
 int getSampleSize()
          Gets the sample size.
 boolean matches(Format other)
          Compares two format descriptors.
 void setChannels(int channels)
          Modifies number of channels.
 void setSampleRate(int sampleRate)
          Modifies sampling rate value.
 void setSampleSize(int sampleSize)
          Modifies sample size.
 String toString()
           
 
Methods inherited from class org.mobicents.media.server.spi.format.Format
getName, getOptions, setName, setOptions
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AudioFormat

protected AudioFormat(EncodingName name)
Creates new audio format descriptor.

Parameters:
name - the encoding name.
Method Detail

getSampleRate

public int getSampleRate()
Gets the sampling rate.

Returns:
the sampling rate value in hertz.

setSampleRate

public void setSampleRate(int sampleRate)
Modifies sampling rate value.

Parameters:
sampleRate - the sampling rate in hertz.

getSampleSize

public int getSampleSize()
Gets the sample size.

Returns:
sample size in bits.

setSampleSize

public void setSampleSize(int sampleSize)
Modifies sample size.

Parameters:
sampleSize - sample size in bits.

getChannels

public int getChannels()
Gets the number of channels. The default value is 1.

Returns:
the number of channels

setChannels

public void setChannels(int channels)
Modifies number of channels.

Parameters:
channels - the number of channels.

clone

public AudioFormat clone()
Overrides:
clone in class Format

matches

public boolean matches(Format other)
Description copied from class: Format
Compares two format descriptors.

Overrides:
matches in class Format
Parameters:
other - the another format descriptor
Returns:

toString

public String toString()
Overrides:
toString in class Format


Copyright © 2011. All Rights Reserved.