This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Applets and the fly likes Audio file won't play - play() not working? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Audio file won Watch "Audio file won New topic
Author

Audio file won't play - play() not working?

James Brooks
Gunslinger
Ranch Hand

Joined: Aug 17, 2006
Posts: 165
Hello again,

The below method is definitely called upon a mouseclick on the JButton, because the console prints "Hello there!" when I do. However, I can't get the audio clip to play when I do so. I'm using NetBeans, and just dragged and dropped the .au file into my source package, so it shows the binary 'chimes.au' file in the same directory as my applet. I've made sure my volume is up, and the compiler doesn't generate any errors (no run-time errors, either). Any ideas on why I can't get this audio file to play? Thanks in advance!



Hello. My name is Inigo Montoya. You killed my father. Prepare to die.
Eric Larsen
Ranch Hand

Joined: Mar 28, 2009
Posts: 35
I'm having pretty much the same problem with MIDI messages. Please see this thread if you think you can help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Audio file won't play - play() not working?
 
Similar Threads
Java Sound API
UnsupportedAudioFileException in AudioSystem.getAudioInputStream
Getting audio to play in the background of my GUI.
Get wav file reference from resource map
Couldn't play AudoClip..