Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

[JAVA] about playing sounds in Java

- - - - -

  • Please log in to reply
No replies to this topic

#1
sabapc

sabapc
  • Member
  • 3 posts
  • Joined 03-June 03
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.
while(System.currentTimeMillis()<T)
;

I need something like:
----------------------------
AudioClip s1 = .....;
AudioClip s2 = .....;
...
s1.play();
...
while(s1.isPlaying()) // This method doesn't exist, is there something similar that do exist ?
;
s2.play();
----------------------------
Something like that.

Thanks...


How to remove advertisement from MSFN



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users