NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

JDK1.0.2 simulations (1996-2001) => Misc => Topic started by: rupesh_ucer@sify.com on March 30, 2006, 11:44:40 am



Title: A PROG WHICH CAN PLAY SOUND FILES IN SEQUENCE LILE WINAMP
Post by: rupesh_ucer@sify.com on March 30, 2006, 11:44:40 am
i m in desperate need of A PROG WHICH CAN PLAY SOUND FILES IN SEQUENCE LIKE MEDAIPLAYER
when i load & play sound via an array and play it in for loop all sounds starts simultaneously THIS IS THE CODE

rupesh_ucer@sify.com ; rupesh_ucer@rediffmail.com

import java.applet.*; import java.awt.*; import java.awt.event.*; import javax.swing.*;
public class arraysoundplay extends JApplet { public AudioClip[] qw=new AudioClip[2]; public AudioClip a,b,c; public void init() { qw[0] = getAudioClip(getDocumentBase(),"sound/station start.wav" ); qw[1] = getAudioClip(getDocumentBase(),"sound/station stop.wav" ); a = getAudioClip(getDocumentBase(),"sound/111.wav" ); //sound[0].play();
} public void start() { qw[0].play(); qw[1].play(); a.play(); }
public void stop() { a.stop(); }
}