sound.recorder
Class FormatBean

java.lang.Object
  extended by sound.recorder.FormatBean
All Implemented Interfaces:
java.io.Serializable

public class FormatBean
extends java.lang.Object
implements java.io.Serializable

Controls for the AudioFormat.

See Also:
Serialized Form

Constructor Summary
FormatBean()
          A serializable version of the AudioFormat
FormatBean(java.lang.String encoding, int sampleRate, java.lang.String signedString, int size, boolean isBigEndian, int channels)
           
 
Method Summary
static byte[] getAudioDataFromInput()
           
static javax.sound.sampled.AudioFormat getAudioFormat(FormatBean formatBean)
           
static javax.sound.sampled.AudioFormat[] getAudioFormats()
           
 int getChannels()
           
 java.lang.String getEncodingS()
           
static java.lang.String[] getEncodingStrings()
           
static java.lang.String[] getEndianStrings()
           
static FormatBean[] getFormatBeans()
          Using all combinations of encodings, sample rates sample sized endian-ness and channel numbers, return all possible AudioFormats (without checking if they are, infact, implemented).
 float getSampleRate()
           
static java.lang.Integer[] getSampleRates()
           
static java.lang.Integer[] getSampleSize()
           
 java.lang.String getSignedS()
           
static java.lang.String[] getSignedStrings()
           
 int getSize()
           
static java.lang.String[] getStereoStrings()
           
static javax.sound.sampled.AudioFormat[] getSupportedTargetDataLineFormats()
           
 boolean isEndianB()
           
static void printEncodings()
           
 void setChannels(int channels)
           
 void setEncodingS(java.lang.String encodingS)
           
 void setEndianB(boolean endianB)
           
 void setFormat(javax.sound.sampled.AudioFormat inputFormat)
           
 void setSampleRate(float sampleRate)
           
 void setSignedS(java.lang.String signedS)
           
 void setSize(int size)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatBean

public FormatBean()
A serializable version of the AudioFormat


FormatBean

public FormatBean(java.lang.String encoding,
                  int sampleRate,
                  java.lang.String signedString,
                  int size,
                  boolean isBigEndian,
                  int channels)
Method Detail

getFormatBeans

public static FormatBean[] getFormatBeans()
Using all combinations of encodings, sample rates sample sized endian-ness and channel numbers, return all possible AudioFormats (without checking if they are, infact, implemented).

Returns:
all possible audio FormatBeans

printEncodings

public static void printEncodings()

getEncodingS

public java.lang.String getEncodingS()

setEncodingS

public void setEncodingS(java.lang.String encodingS)

getSampleRate

public float getSampleRate()

setSampleRate

public void setSampleRate(float sampleRate)

getSignedS

public java.lang.String getSignedS()

setSignedS

public void setSignedS(java.lang.String signedS)

getSize

public int getSize()

setSize

public void setSize(int size)

isEndianB

public boolean isEndianB()

setEndianB

public void setEndianB(boolean endianB)

getChannels

public int getChannels()

setChannels

public void setChannels(int channels)

getSampleRates

public static java.lang.Integer[] getSampleRates()

getEncodingStrings

public static java.lang.String[] getEncodingStrings()

getSampleSize

public static java.lang.Integer[] getSampleSize()

getSignedStrings

public static java.lang.String[] getSignedStrings()

getEndianStrings

public static java.lang.String[] getEndianStrings()

getStereoStrings

public static java.lang.String[] getStereoStrings()

getSupportedTargetDataLineFormats

public static javax.sound.sampled.AudioFormat[] getSupportedTargetDataLineFormats()

getAudioFormats

public static javax.sound.sampled.AudioFormat[] getAudioFormats()

getAudioFormat

public static javax.sound.sampled.AudioFormat getAudioFormat(FormatBean formatBean)

setFormat

public void setFormat(javax.sound.sampled.AudioFormat inputFormat)

getAudioDataFromInput

public static byte[] getAudioDataFromInput()
                                    throws javax.sound.sampled.LineUnavailableException,
                                           java.io.IOException
Throws:
javax.sound.sampled.LineUnavailableException
java.io.IOException