A Progress/Seek Bar for Audio

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Dec 2004
Posts: 27
Reputation: Frank0051 is an unknown quantity at this point 
Solved Threads: 0
Frank0051 Frank0051 is offline Offline
Light Poster

A Progress/Seek Bar for Audio

 
0
  #1
Jan 2nd, 2006
I'm pretty new to Java and GUI programming, so I have been looking at Swing for GUI programming and I have been looking at javazoom's projects for audio references. I'm currently working on creating a progress/seek bar in Swing however I'm not really sure what I should set the max value at for the slider, should it be in the AudioInputStream's available() method's byte number return when the stream is first returned (before anything is read) or should it be something else? Also how often should the slider update...ever time I read a new byte array into the dataLine/sourceLine from the input stream?
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: A Progress/Seek Bar for Audio

 
0
  #2
Jan 3rd, 2006
The total data size is a good number, or take an estimate of the total time needed.
How often you update is up to you, after each Xth read operation would be good (where X is a number you decide on based on performance).
Updating after every read might cause too great a performance hit but you could start with that and then reduce the update frequency until everything seems to perform nicely and still not be jerky.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC