title: How to draw a graph of sounds while recording in java sound?
body: <p>I successfully recording java sounds from my micro phone and can draw the recorded wave file 
  graph as in attached image.
  (I have tried to upload image from here a lot, but it is failed every time.i also used tinypic also but failed in uploading , i think there is some error in my internet connection, i will upload it later here. )</p>
  
  <p>I am also attaching all my code.
  <a href="http://pastebin.com/EgW2ZcyJ" rel="nofollow">http://pastebin.com/EgW2ZcyJ</a></p>
  
  <p>Now, my question is i want to display Graphs for the sound while recording in real time .so if i try to read audio input stream which is used in recording in new thread and sleep this thread for 1 seconds until the recording is finished . but in this approach it gives frame length -1 so nothing can be drawn.</p>
  
  <p><strong>so how can i draw a graph means how can i get frames of recorded sound [bytes from audio input stream] while recording in real time , so i can use it to draw a graph using it in different thread so i can exactly simulate what window's sound recorder provides ??</strong></p>
  
  <p>Thank You
  Mihir Parekh</p>