capturing sound from a microphone in java

I am trying to capture sound from a microphone in java using this class http://www.jsresources.org/examples/SimpleAudioRecorder.java.html but first of all after recording it the file cannot be open using windows media player. It gets open by a VLC media player but it doesn't show the length of the audio file. it says 6:45 where the recorded sound has only 3 sec.
chudyksgAsked:
Who is Participating?
 
Bryan ButlerConnect With a Mentor Commented:
What version of Java are you using?  Seems like the encoding is not puttin the header info as that will have the "length" in it I believe.  Here's some info that might help:

Java Sound API: Java Sound Demo
http://www.oracle.com/technetwork/java/index-139508.html

Java Sound API: What's new in version 1.5.0
http://www.oracle.com/technetwork/java/tiger-140463.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.