AudioCovnerter ulaw to alaw conversion error
Brought to you by:
pfisterer
Hi,
Trying to convert a mu-law (ULAW) wav file to a-law I
get a "format conversion not supported" error, details:
Source in.wav:
Type: WAVE
AudioFormat: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame
AudioConverter arguments:
"-e ALAW -f 8000 in.wav out.wav"
Following seems to work:
Change AudioCovnerter.java line nr +/- 321 (in method
main()):
/* Step 1: convert to PCM, if necessary.
*/
if (! AudioCommon.isPcm(format.getEncoding()))
New code:
/\* Step 1: convert to PCM, if necessary. \*/ if
(!format.getEncoding().equals(AudioFormat.Encoding.ULAW)
&& ! AudioCommon.isPcm(format.getEncoding()))
Mostapha al Mourabit