sound.recorder
Class FormatBean
java.lang.Object
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)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
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