DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    5

    Unhappy 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?

    Thanx

  2. #2
    Join Date
    Mar 2003
    Posts
    86

    Threads

    Try playing the sound in a new Thread. This way you will not block the UI.

    Sharbov.

  3. #3
    Join Date
    Nov 2002
    Posts
    138
    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.

  4. #4
    Join Date
    Aug 2003
    Posts
    5
    Hey...i learned about threads and now it works!
    thanx!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links