my audioclip won't work

Discussion in 'Java' started by MrThis, Jun 26, 2005.

  1. MrThis

    MrThis Guest

    My audio clip program (below), won't work. What am I doing wrong?

    import java.awt.*;
    import java.applet.*;

    <applet code = "Playit" width=200 height=200>

    public class Playit extends Applet{
    public void init() {

    AudioClip sound = getAudioClip(getDocumentBase(), "lightsout.wav");;


    MrThis, Jun 26, 2005
    1. Advertisements

  2. Maybe it is just lazy. HAve you tried flogging it? [ ;-) ]
    Look at the console in the browser, that often speaks volumes.
    And supply an URL to your (broken) web page/applet as it is.
    Andrew Thompson, Jun 26, 2005
    1. Advertisements

  3. MrThis

    Mickey Segal Guest

    In versions of Java that I've used, you need AU format instead of WAV

    In older versions of Java you needed sounds sampled at 8 kHz.
    Mickey Segal, Jun 26, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.