Action Listener not working while audio playing
Hello, I am using the sound api to play an audio file of the hard disk as a SourceDataLine. When i run the program, and press on the play button, the song plays just fine.
BUT.. i have to wait until the song finishes playing completely before the program can do anything else. It wont do ANYTHING until then. The action listener doesnt work so I cannot press teh STOP button or even move any frames around the screen..nothing...
Anybody else had this problem?
Try playing the sound in a new Thread. This way you will not block the UI.
i once made a simple mp3 player once for a classmate and didn't have this problem before. i didn't even have to use threads.
Hey...i learned about threads and now it works!
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center