943,610 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 4332
  • Java RSS
Feb 13th, 2009
0

java > play audio file

Expand Post »
i want to play an audio file in java without opening a player ...

like an alarm ...

does any1 knows how to do this.. and r there any sample codes available online ... (please provide relevant links only)
Similar Threads
Reputation Points: 1
Solved Threads: 3
Junior Poster
localp is offline Offline
190 posts
since Apr 2008
Feb 13th, 2009
1

Re: java > play audio file

hmm wierd, what didn't you find? I typed in

java play audio file

and found a ton of stuff in google . . .
Reputation Points: 155
Solved Threads: 41
Posting Whiz in Training
rapture is offline Offline
294 posts
since Jul 2007
Feb 13th, 2009
1

Re: java > play audio file

After 61 posts here, you should be well aware that "chat-speak" or "IM-speak" is discouraged in the forum rules. Are you really too lazy to type out all of the letters and use punctuation where appropriate? Should anyone else spend their time to help someone who doesn't care enough to take the time to communication properly? Think about it.

That said, try the Java Media Framework. You can find a lot of demo code and examples here: http://java.sun.com/javase/technolog...les/index.html
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 838
Posting Genius
Ezzaral is offline Offline
6,756 posts
since May 2007
Feb 13th, 2009
-1

Re: java > play audio file

Click to Expand / Collapse  Quote originally posted by rapture ...
hmm wierd, what didn't you find? I typed in

java play audio file

and found a ton of stuff in google . . .
the prob is, that the player should not open ... and only the sound should play ..... like in gmail chat , wen a new message comes, a sound also plays...(but without opening a player)
Reputation Points: 1
Solved Threads: 3
Junior Poster
localp is offline Offline
190 posts
since Apr 2008
Feb 13th, 2009
0

Re: java > play audio file

I tried to help you once. Again I typed in "Java play audio file" and the first result from google was here
http://www.google.com/search?hl=en&q...lay+audio+file
in google the description says this
"Here's a step-by-step guide to playing audio files in a Java application"


And Ezzaral is right, please refrain from using IM type speak. This isn't a chat room.
Reputation Points: 155
Solved Threads: 41
Posting Whiz in Training
rapture is offline Offline
294 posts
since Jul 2007
Feb 15th, 2009
0

Re: java > play audio file

just because you play an audio file doesn't mean you have to open a visible player.

now, if you want to play a .wav or .au file, or something similar, you don't need to install JMF or anything like that, but if you're trying to play .mp3 files, you have (as far as I know) 2 options (propably more, but only looked into these two myself):
1. the Java Media Framework, provided by Sun
2. the JLayer - mp3 library. I've used this one since it was VERY user friendly.

you should be able to write an application that does the trick by now, if it doesn't work, don't just repeat the question, but show us the code you have so far, and explain what function of it doesn't work the way you want it to
Reputation Points: 919
Solved Threads: 354
Nearly a Posting Maven
stultuske is offline Offline
2,475 posts
since Jan 2007
Feb 15th, 2009
0

Re: java > play audio file

thanks a lot, I'll try coding it, and if i come across any errors, I'll contact you guys,, thanks a lot.
Reputation Points: 1
Solved Threads: 3
Junior Poster
localp is offline Offline
190 posts
since Apr 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Problems getting focus on buttons
Next Thread in Java Forum Timeline: Need help using MaskFormatter





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC