This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Audio Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Audio Problem" Watch "Audio Problem" New topic
Author

Audio Problem

J Cleary
Greenhorn

Joined: Mar 24, 2006
Posts: 13
Hello, i am looking for how to play wav files in a java application please?
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
One way is by using the method newAudioClip in java.applet.Applet
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

The Java Media Framework (JMF) is what you need to use. The applet sound capability doesn't work outside of a browser or appletviewer, and support for various formats is extremely spotty.


[Jess in Action][AskingGoodQuestions]
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
I agree the Java Media Framework is better, but they did add a static method called newAudioClip to the Applet class that gives you some support for audio outside of an applet.

 
 
subject: Audio Problem