MSFN Forum: [JAVA] about playing sounds in Java - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[JAVA] about playing sounds in Java how can i "know" if a sound is playing ? Rate Topic: -----

#1 User is offline   sabapc 

  • Group: Members
  • Posts: 3
  • Joined: 03-June 03

Posted 17 June 2003 - 10:43 PM

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...


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy