Sound support

How easy is it to add sound support to jme?

:?

jME does not currently support sound in anyway. However, LWJGL provides wrappers to OpenAL. So, you can add sound all you want through LWJGL, just not jME.



Future plans for sound and jME are to encapsulate a sound as an entity. This sound entity then has a 3D position for 3D sound, can be attached to any other entity, has a bounding volume so that if a player is within the bounding volume it plays etc.



With everything else right now, it’s scheduled but not started.

"mojomonk" wrote:
jME does not currently support sound in anyway. However, LWJGL provides wrappers to OpenAL. So, you can add sound all you want through LWJGL, just not jME.

Future plans for sound and jME are to encapsulate a sound as an entity. This sound entity then has a 3D position for 3D sound, can be attached to any other entity, has a bounding volume so that if a player is within the bounding volume it plays etc.

With everything else right now, it's scheduled but not started.

have a look at cas' spgl library... he spent a lot of time getting the sound right for alien flux and donated his sound stuff there

Ok, I’ll take a look to get any ideas. One thing I noticed about Alien Flux is that it doesn’t seem to have any 3D sound.

"mojomonk" wrote:
Ok, I'll take a look to get any ideas. One thing I noticed about Alien Flux is that it doesn't seem to have any 3D sound.

but it sounds cool :D

anyway, he has some nice buffering/queing, and prioritizing stuff that makes sure openal doesnt screw up... i guess in openal you can only have about 8 sounds going at once... i havent tried it yet, so definitely have a good look at it :)

I had a look at both LWJGL and SPGL and SPGL does provide a few extra methods to improve OpenAL but they seem to only support .wav files and niether of them seem to support MP3 (based on my limited serach of the code). any ideas what would be a good mp3 library to use with jme. :?

LWJGL :slight_smile: I plan on supporting MP3s directly. I’d recommend learning to do it in LWJGL / OpenAL and then letting me know how to do it :slight_smile:



http://www.devmaster.net/articles.php?catID=6 has some good tutorials on the subject. Ogg Vorbis support as well.

spgl has tools that can convert music to a format it can use…



as an aside: you can turn any mp3 into a wav and then decode it for use in spgl with the tools. if you save it as ogg vorbis, it will be way better quality than mp3, use about the same amount of disk as mp3, people wouldnt be able to steal your music (unless they had the tools too) and can be used with spgl for you games… seems like a win to me :smiley: