aspose file tools
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 Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Audio Problem" Watch "Audio Problem" New topic

Audio Problem

J Cleary

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

Joined: Jul 08, 2003
Posts: 24189

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.

I agree. Here's the link:
subject: Audio Problem