This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Audio Problem  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, i am looking for how to play wav files in a java application please?
 
Ranch Hand
Posts: 2410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way is by using the method newAudioClip in java.applet.Applet
 
author and iconoclast
Sheriff
Posts: 24219
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Keith Lynn
Ranch Hand
Posts: 2410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!