Need help with looping some sounds

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2004
Posts: 4
Reputation: cody_e is an unknown quantity at this point 
Solved Threads: 0
cody_e cody_e is offline Offline
Newbie Poster

Need help with looping some sounds

 
0
  #1
Mar 2nd, 2004
I need to loop the one sound so that the timer will make it so the sound will play then delay 5 seconds and then play again.

My source code is:

--------------------------------------------------------------------------------------------------------
import java.awt.*;
import javax.swing.*;
import java.applet.AudioClip;
public class Morning extends JApplet
{
private AudioClip rooster;
private final int dealy = 5000;
private Timer t;
public Morning()
{
t = new Timer(delay, this);
}
public void init()
{
rooster = getAudioClip(getDocumentBase(),
"roost.wav");
rooster.play();
t.start();

Container c = getContentPane();
c.setBackground(Color.white);
}
}
--------------------------------------------------------------------------------------------------------
Can anybody please help me?
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 4
Reputation: cody_e is an unknown quantity at this point 
Solved Threads: 0
cody_e cody_e is offline Offline
Newbie Poster

Re: Need help with looping some sounds

 
0
  #2
Mar 4th, 2004
Is there like anybody here. I posted this like 2 days ago.
Reply With Quote Quick reply to this message  
Join Date: Feb 2004
Posts: 156
Reputation: RC_Razor is an unknown quantity at this point 
Solved Threads: 0
RC_Razor's Avatar
RC_Razor RC_Razor is offline Offline
Junior Poster

Re: Need help with looping some sounds

 
0
  #3
Mar 4th, 2004
were all dumb and dont know ??? no just joking .. youll find someone once there online...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC