Sign in to follow this  
Followers 0

[JAVA] about playing sounds in Java

1 post in this topic

If i play a sound (in Java), and i want to play another sound inmediatly after the first finish.. how can i "wait" until the first finish ?

Note: I don't know the length of each sound when i'm writing the program so i can't wait a constant like.



I need something like:


AudioClip s1 = .....;

AudioClip s2 = .....;



while(s1.isPlaying()) // This method doesn't exist, is there something similar that do exist ?



Something like that.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.