Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Java sound-err->Windows Media Player cannot pla

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's been a while since I've needed sound but I know a bit about
The Java Sound API . Problem is, I wrote a program that does the most basic .au sound loading and playback (short clips). Not unlike what every java
programmer learns in week two. My question is:
Why does this simple process seem to disable other uses of the sound card, even when no sound is being played. E.g., I load the web page which plays the sound clips, applet loads and executes beautifully. No sound is being played however, I minimize the browser, open up WMP, load a song, and receive the following error:
Windows Media Player cannot play the file because there is a problem with your sound device.

Now, I can even go maximize my browser, go to a new page, completely leaving the applet page, and check WMP again, same result. My sound card isn't released until I actually shut down the browser. This occurs on Netscape and IE.

The code, as I said, is basic:
public void playsound(String soundeffect)
{
soundfile = getAudioClip(getCodeBase(),soundeffect);

if(soundfile != null)
soundfile.play();


}//end playsound

Can anyone help? Thanks, Tom
 
Tom Clement
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hope it's ok to give myself a bump, I'm still hoping there's a workaround for this. Thanks again, Tom
 
I love a woman who dresses in stainless steel ... and carries tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic