The basic recording process is as follows:
Describe the audio format in which you want to record the data. This includes specifying the sampling rate and the number of channels (mono versus stereo) for the audio. You specify these properties using the aptly named AudioFormat class. There are two constructors for creating an AudioFormat object:
AudioFormat(AudioFormat.Encoding encoding,
float sampleRate, int sampleSizeInBits,
int channels, int frameSize, float frameRate,
boolean bigEndian)
AudioFormat(float sampleRate, int sampleSizeInBits,
int channels, boolean signed, boolean bigEndian) |
The first constructor lets you explicitly set the audio format encoding, while the latter uses a default. The available encodings are ALAW, PCM_SIGNED, PCM_UNSIGNED, and ULAW.
refer this links
http://www.java-tips.org/java-se-tips/javax.sound/capturing-audio-with-java-sound-api.html
http://java.sun.com/j2se/1.3/pdf/javasound.pdf
http://download.oracle.com/javase/tutorial/sound/index.html
Regards