Question

I have searched everywhere on the internet for a solution for this and I can't seem to find a definitive answer.

Basically, I'm looking to implement a 3D audio environment on the android platform. What I'm searching for is an android library that is capable of placing sounds in a virtual space using something like a coordinate system.

I am aware that iOS has OpenAL, but is there an Android equivalent? I am also aware of the existence of the AudioTrack class, but I'm looking for something a little less primitive.

Thanks in advance.

Was it helpful?

Solution

Thanks for your advice all.

I was searching the internet and I found this OpenAL library for Android which uses the NDK: OpenAL4Android.

It has enough features implemented for what I need, allowing you to build up a fairly complex 3D audio scene.

If anyone is looking for instructions on how to get and use the NDK, look here: Android NDK. (I suggest reading the whole thing)

Just to clarify, it was quite easy to get it working.

OTHER TIPS

Cricket Audio works on Android, and can do some simple 3D sound placement.

There is no solution yet for real 3D sound on Android. OpenAL4Android and Cricket Audio works fine, but they can only set different volumes to left and right ear depending on distance from sound source. And moving sound source in front of a user and in the back makes no difference. Real 3D sound is produced with usage of HRT functions (HRT) that can cheat your brain to think that sound source is for example behind. You can read about it in Wikipedia.

Not sure how helpful this will be, but I know that SDL can be used for Android development in some cases. SDL then has SDL-Mixer which supports very basic software 3D audio, in the form of distance and angle if I recall.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top