• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

playing sounds using Applet class

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the code I used to play a sound in my program that will notify the user the something has happened.
URL url = //url to the wav file I want played
AudioClip clip = Applet.newAudioClip(url);
clip.play();
What I am experiencing is that the sounds is played sometimes and sometimes not. It is played more offten than not, but still it happens that sometimes it is not. Am I doing something wrong? Any suggestions what might be the problem? Thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic