Getting following exception javax.sound.sampled.LineUnavailableException: line with format ULAW 800

Posted by angelina on Stack Overflow See other posts from Stack Overflow or by angelina
Published on 2010-06-01T10:09:40Z Indexed on 2010/06/01 10:13 UTC
Read the original article Hit count: 303

Filed under:
|

Dear All, I tried to play and get duration of a wave file using code below but got following exception.please resolve.I m using a wave file format.

URL url = new URL("foo.wav");
Clip clip = AudioSystem.getClip();
AudioInputStream ais = AudioSystem.getAudioInputStream(url);
clip.open(ais);
System.out.println(clip.getMicrosecondLength());

**javax.sound.sampled.LineUnavailableException: line with format ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,  not supported.**

© Stack Overflow or respective owner

Related posts about java

Related posts about audio