Menu

#3 AudioCovnerter ulaw to alaw conversion error

open
nobody
None
5
2015-01-12
2006-10-31
Anonymous
No

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

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.