views:

875

answers:

2
+2  Q: 

Android OpenAL?

Has anyone built OpenAL for the Android, or found the shared library for it on the system? This seems like an obvious need for a game of any kind, yet there's no resources out there for it. It seems the Android java sound library can't do pitch changes from what I can tell, so there seems a need for OpenAL. I know OpenAL Soft can be built on top of ALSA, but I'm not sure if anyones done that, and I'm sure it would take me a month.

If there's a good guide somewhere on sound manipulation on the Android without OpenAL, that's fine too. It's just that OpenAL is sort of a standard for game makers and it would be nice to port my thousands of lines over to this system, which I sort of thought was the point of the NDK before I dugg into it and saw that there's almost no shared library access on the system.

Thanks.. I hope I can actually port without becoming a java expert myself. Really disliking the NDK so far!

A: 

You can use the NDK to build OpenAL and package it with your APK. That way you can access it from your native code.

CaseyB
You can't access the low-level sound APIs (ALSA etc.) in any supported way from the NDK, so no, you can't do this.
SomeCallMeTim
+1  A: 

OpenSL is planned for a future Android build; OpenAL isn't available, and the low-level hardware is off-limits to anything you can do in the NDK, so you can't safely build it yourself.

There's no support for low-latency audio even planned; there's a bug to that effect here:

http://code.google.com/p/android/issues/detail?id=3434

Star it if it's relevant to you; maybe Google will listen if it gets enough stars.

SomeCallMeTim