This discussion is archived
10 Replies Latest reply: Aug 2, 2010 6:49 AM by 843853 RSS

Mp3 class?

843853 Newbie
Currently Being Moderated
Hello all,
gentlemen, need a simple mp3 class with play() loop() and stop() methods...Anyone can be help be ?
Regards.
  • 1. Re: Mp3 class?
    796262 Newbie
    Currently Being Moderated
    Rapworld wrote:
    Hello all,
    gentlemen,
    What about the ladies?
    need a simple mp3 class with play() loop() and stop() methods...
    You mean the AudioClip class?
    Anyone can be help be ?
    That's not really how this works. What happened when you tried it yourself? What did you try? What worked, what didn't work? Why didn't it work? If you don't even know where to start, what did you find after googling?
  • 2. Re: Mp3 class?
    843853 Newbie
    Currently Being Moderated
    yes, need AudioClip class for playing, looping and stoppping mp3 audio files in a game.
  • 3. Re: Mp3 class?
    796262 Newbie
    Currently Being Moderated
    Rapworld wrote:
    yes, need AudioClip class for playing, looping and stoppping mp3 audio files in a game.
    ...so what's stopping you from using it?
  • 4. Re: Mp3 class?
    843853 Newbie
    Currently Being Moderated
    I've no idea how to implements it! Can u past me the source code? Thx

    Edited by: Rapworld on Jun 3, 2010 12:04 PM
  • 5. Re: Mp3 class?
    843853 Newbie
    Currently Being Moderated
    I'm a newbie in java language sorry..

    Edited by: Rapworld on Jun 3, 2010 7:17 PM
  • 6. Re: Mp3 class?
    796262 Newbie
    Currently Being Moderated
    Rapworld wrote:
    I've no idea how to implements it! Can u past me the source code? Thx
    Like I said, that's not how it works.

    Some links you should definitely check out:
    [How to Ask Questions the Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html]
    Pay close attention to the section titled "Write in clear, grammatical, correctly-spelled language".
    [java audio clip|http://www.google.com/search?q=java+audio+clip]
  • 7. Re: Mp3 class?
    843853 Newbie
    Currently Being Moderated
    find that here: http://www.google.com
  • 8. Re: Mp3 class?
    843853 Newbie
    Currently Being Moderated
    i would suggest you start reading your api .
    if you did you would have seen that java does not support mp3 files.
    to resolve this you will either have to download some mp3 playing classes or write your own

    API
    http://download.oracle.com/javase/1.4.2/docs/api/
  • 9. Re: Mp3 class?
    843853 Newbie
    Currently Being Moderated
    For games, a much better idea than using mp3 for sound is using OGG - it's an open source format, and OGG files are generally smaller in size than the equivalent mp3. There are lots of free utilities that will convert MP3 files to OGG. Even better, there's a free, open source library for handling the OGG format:

    [http://www.jcraft.com/jorbis/]

    There's a lot of talk on that page about using the library to play ogg files on web pages, but if you dig into the library source, you'll find an example of using it to feed data to JavaSound, which is what you want to do for a game.
  • 10. Re: Mp3 class?
    jwenting Journeyer
    Currently Being Moderated
    Rapworld wrote:
    I'm a newbie in java language sorry..
    worst excuse, ever.
    Especially if you're thinking of making games, which is not something for beginners to attempt.