| | |
A Progress/Seek Bar for Audio
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Dec 2004
Posts: 27
Reputation:
Solved Threads: 0
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?
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.
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.
![]() |
Similar Threads
- Blue Screen of Death on XP (Windows NT / 2000 / XP)
- Has My IE6 Browser Been HiJacked? HiJackThis Log file Here - please help! (Viruses, Spyware and other Nasties)
- an animated STATUS BAR, or PROGRESS BAR, (Community Introductions)
- Javascript Progress Bar flickers (JavaScript / DHTML / AJAX)
- Problem Capturing video with AIW 9600XT (Windows NT / 2000 / XP)
- Windows Does Not Start - New Mobo (Motherboards, CPUs and RAM)
Other Threads in the Java Forum
- Previous Thread: No idea...
- Next Thread: black jack game
| Thread Tools | Search this Thread |
Tag cloud for Java
affinetransform android api append apple applet application arguments array arrays automation bi binary bluetooth businessintelligence busy_handler(null) chat class classes client code component database draw eclipse encryption equation error event exception file fractal game givemetehcodez graphics gui helpwithhomework html ide image input integer intersect j2me java javaexcel javaprojects jmf jni jpanel julia linked linux list loop main map method methods mobile netbeans newbie number open-source oracle oriented panel print problem program programming project qt recursion reference replaysolutions repositories return robot scanner screen scrollbar se server set singleton size sms socket sort sql string swing test threads time tree utility windows xor






