/*
 * @(#)src/demo/sound/src/JavaSoundApplet.java, audio, ds1411, 20030828 1.8.2.1
 * ===========================================================================
 * Licensed Materials - Property of IBM
 * "Restricted Materials of IBM"
 *
 * IBM SDK, Java(tm) 2 Technology Edition, v1.4.1
 * (C) Copyright IBM Corp. 1998, 2002. All Rights Reserved
 * ===========================================================================
 */

/*
 * ===========================================================================
 * Copyright (c) 1998-2001 by Sun Microsystems, Inc. All Rights Reserved.
 * ===========================================================================
 */




import javax.swing.JApplet;

/**
 * A demo that shows JavaSound features. 
 *
 * Parameters that can be used in the JavaSound.html file inside
 * the applet tag to customize demo runs :
 *            <param name="dir" value="audioDirectory">
 *
 *
 * @author Brian Lichtenwalter 
 */
public class JavaSoundApplet extends JApplet {

    static JavaSoundApplet applet;
    private JavaSound demo;

    public void init() {
        applet = this;
        String media = "media";
        String param = null;
        if ((param = getParameter("dir")) != null) {
            media = param;
        } 
        getContentPane().add("Center", demo = new JavaSound(media));
    }

    public void start() {
        demo.open();
    }

    public void stop() {
        demo.close();
    }
}
