Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this questionHow to use the buttons to play audio with siwng, some example please ?
I'm using a button ok, it plays the song, but when i click the button it just can't get clicked again until the song ends .Any ideas, h开发者_JAVA百科ow to make that works ?Wheni click button to start the audio, and how to do to let me click the button again, until it ends the audio ?
There is good example at http://www.developer.com/java/other/article.php/2173111/Java-Sound-Playing-Back-Audio-Files-using-Java.htm and it works fine. The audio gets stopped.
Update
I found this interesting link, maybe it helps:
http://introcs.cs.princeton.edu/faq/mp3/mp3.html
start a new thread on button click and play the sound there, it will work fine. If you try to play it there, the UI will stuck and you will have issues.
精彩评论