Hi, Well, there are a number of options here and they all have pros and cons.I guess I would need to know more about your project to advise you as what to do since there are many different options to choose from.
For example, the Java runtime environment comes with a basic API for handling wav and aif files using the javax.sampled.Clip class. It can't handle compressed file types such as mp3, wma, or ogg natively, but it is actually a fairly decent API all things considered. If you need to decompress mp3, wma, or ogg you will need to get and install the Java Media Framework, JMF, which was designed to handle various file types. That is just one of many options at your disposal. If you want my personal recommendation you will probably want to try Joal, a Javawrapper for OpenAL, which will give you all the advantages of OpenAL, but that might be overkill for your project. I just don't know what you need at this point to properly advise you if this is a good choice or not. Anyway, those are just some of the cross-platform solutions I can think of. If you are writing specifically for Windows you can write a com wrapper around the FMOD Ex API or around Microsoft's XAudio2 API. Either way its not extremely difficult to get a decent audio engine going in Java using a standard com interface on Windows. However, it all depends on your needs here. Cheers! On 1/4/13, Felipevr <[email protected]> wrote: > Greetings all, > > I'm developping some audio games projects, however I have encountered a big > problem: > how can I play w av or mp3 sounds. I found some solutions, but they all seem > quite complex and I'm hunting for some more practical that solves my > problem. > > I need, basically, to play sounds in wav and mp3 format with the > possibility of switching the output channels, pause, start, or even keep in > the loop and, if possible, > a very welcome bonus would control the volume of audio ... > This, of > course, with the possibility of running more than one sound at the same > time-background sound and sound of action, for example (threads I suppose > ...) > . > > could someone give me a hand? > Thank you! > PS: for those who find it easier, my msn: > [email protected] > > _______________________________________________ > Developers mailing list > [email protected] > http://usagamesinteractive.com/mailman/listinfo/developers_usagamesinteractive.com > --- Gamers mailing list __ [email protected] If you want to leave the list, send E-mail to [email protected]. You can make changes or update your subscription via the web, at http://mail.audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/[email protected]. If you have any questions or concerns regarding the management of the list, please send E-mail to [email protected].
