Udipta
2004-07-22 09:57:05 UTC
I am making a java application where I am required to record voice in
a-law format. The program i have written starts perfectly without
giving any error or warning, but as soon as i start recording an
exception is thrown.
java.lang.IllegalArgumentException: No line matching interface
TargetDataLine supporting format ALAW, 8000.0 Hz, 16 bit, mono,
little-endian, audio data is supported.
The AudioFormat object is created using the following code:
public static final AudioFormat DEFAULT_AUDIO_FORMAT = new
AudioFormat(AudioFormat.Encoding.ALAW,8000,16,1,2,8000,true);
I want to know whether voice can be recorded in ALAW format on
computer using Java Sound Api. And if so what has to be done or from
where I could get some help. Please let me know ASAP.
a-law format. The program i have written starts perfectly without
giving any error or warning, but as soon as i start recording an
exception is thrown.
java.lang.IllegalArgumentException: No line matching interface
TargetDataLine supporting format ALAW, 8000.0 Hz, 16 bit, mono,
little-endian, audio data is supported.
The AudioFormat object is created using the following code:
public static final AudioFormat DEFAULT_AUDIO_FORMAT = new
AudioFormat(AudioFormat.Encoding.ALAW,8000,16,1,2,8000,true);
I want to know whether voice can be recorded in ALAW format on
computer using Java Sound Api. And if so what has to be done or from
where I could get some help. Please let me know ASAP.