Results 1 to 4 of 4
  1. #1
    CoderMan is offline Member
    Join Date
    Feb 2010
    Location
    Ross Lunar Capsule 2571
    Posts
    15
    Rep Power
    0

    Default AudioClip: Sound file format?

    I'm using java.applet.AudioClip with getAudioClip because I wanted the buttons in my applet to make sounds when I click on them (like beeping, for example). I wasn't sure which audio file format I should use, so I went with WAV which has been around a while.

    If I view my applet on a Mac OS X box with Safari, this works just fine: every time I click on my button, the beep.wav file plays like it should. But if I view the same applet in Firefox 3.6.3 under Linux, the sound plays once, but then will not play unless I restart the applet.

    I was wondering if this perhaps had something to do with the audio file format I had chosen. Maybe there is some preferred audio format that is more cross-browser compatible? Or maybe I should be using something other than java.applet.AudioClip? Any helpful thoughts?

  2. #2
    gafa's Avatar
    gafa is offline Senior Member
    Join Date
    Jun 2010
    Posts
    107
    Rep Power
    0

    Default

    You tried to make static the audio stream reader ?
    + 1 my REP
    Good Luck :)

  3. #3
    CoderMan is offline Member
    Join Date
    Feb 2010
    Location
    Ross Lunar Capsule 2571
    Posts
    15
    Rep Power
    0

    Default

    Quote Originally Posted by gafa View Post
    You tried to make static the audio stream reader ?
    No, I'm not sure what you mean, to be honest. I use getAudioClip to get a single AudioClip object. I assign the AudioClip object to a class variable which I play when a button is pressed (with the AudioClip's "play" method). So the AudioClip object is only created once. Is that what you are referring to?

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,253
    Rep Power
    19

Similar Threads

  1. Sound file player
    By yourdaddy in forum NetBeans
    Replies: 9
    Last Post: 05-25-2010, 03:36 AM
  2. AudioClip
    By jon80 in forum New To Java
    Replies: 10
    Last Post: 06-13-2009, 07:10 PM
  3. Volume of AudioClip
    By Fedor in forum New To Java
    Replies: 0
    Last Post: 04-25-2009, 04:16 PM
  4. Applet-Image,audioclip problem-pls help
    By samares in forum Java Applets
    Replies: 1
    Last Post: 02-21-2009, 03:23 AM
  5. uploading sound file in java
    By po0oker in forum Advanced Java
    Replies: 8
    Last Post: 11-03-2007, 11:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •