sound.recorder
Class SupportedAudioFormat

java.lang.Object
  extended by sound.recorder.SupportedAudioFormat

public class SupportedAudioFormat
extends java.lang.Object

TODO: create a class that gives us all the supported audio formats for a microphone!


Field Summary
static int DEFAULT_CHANNELS
           
static java.lang.String DEFAULT_FORMAT
           
static float DEFAULT_RATE
           
static javax.sound.sampled.AudioFileFormat.Type DEFAULT_TARGET_TYPE
           
 
Constructor Summary
SupportedAudioFormat(java.lang.String strName, javax.sound.sampled.AudioFormat.Encoding encoding, int nSampleSize)
          Construct a new supported format.
 
Method Summary
static javax.sound.sampled.AudioFormat getAudioFormat(int nOutputFormatIndex, int nChannels, float fRate)
           
 boolean getBigEndian()
          Returns the endianess of the format.
 javax.sound.sampled.AudioFormat.Encoding getEncoding()
          Returns the encoding of the format.
 java.lang.String getName()
          Returns the name of the format.
 int getSampleSize()
          Returns the sample size of the format.
static SupportedAudioFormat[] getSupportedFormats()
           
static javax.sound.sampled.TargetDataLine getTargetDataLine(javax.sound.sampled.Mixer.Info mixerInfo, javax.sound.sampled.AudioFormat audioFormat, int nInternalBufferSize)
           
 void setM_bBigEndian(boolean m_bBigEndian)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FORMAT

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

DEFAULT_CHANNELS

public static final int DEFAULT_CHANNELS
See Also:
Constant Field Values

DEFAULT_RATE

public static final float DEFAULT_RATE
See Also:
Constant Field Values

DEFAULT_TARGET_TYPE

public static final javax.sound.sampled.AudioFileFormat.Type DEFAULT_TARGET_TYPE
Constructor Detail

SupportedAudioFormat

public SupportedAudioFormat(java.lang.String strName,
                            javax.sound.sampled.AudioFormat.Encoding encoding,
                            int nSampleSize)
Construct a new supported format.

Parameters:
strName - the name of the format.
encoding - the encoding of the format.
nSampleSize - the sample size of the format, in bits.
Method Detail

getSupportedFormats

public static SupportedAudioFormat[] getSupportedFormats()

getName

public java.lang.String getName()
Returns the name of the format.


getEncoding

public javax.sound.sampled.AudioFormat.Encoding getEncoding()
Returns the encoding of the format.


getSampleSize

public int getSampleSize()
Returns the sample size of the format. This value is in bits.


getBigEndian

public boolean getBigEndian()
Returns the endianess of the format.


setM_bBigEndian

public void setM_bBigEndian(boolean m_bBigEndian)

getAudioFormat

public static javax.sound.sampled.AudioFormat getAudioFormat(int nOutputFormatIndex,
                                                             int nChannels,
                                                             float fRate)

getTargetDataLine

public static javax.sound.sampled.TargetDataLine getTargetDataLine(javax.sound.sampled.Mixer.Info mixerInfo,
                                                                   javax.sound.sampled.AudioFormat audioFormat,
                                                                   int nInternalBufferSize)
                                                            throws javax.sound.sampled.LineUnavailableException
Throws:
javax.sound.sampled.LineUnavailableException