How to rebuild OpenAL for Android

I’m still debugging a problem I’m having with OpenAL on Android. From the lime side, I can see that OpenALChannel::isComplete() thinks that we’re still playing dynamic audio, but the OpenAL driver is stopped. (In fact, I can workaround my problem by restarting the audio here if it’s stopped, but that’s certainly not the ideal solution.)

So now I’m trying to figure out how the OpenAL driver gets to the AL_STOPPED state be instrumenting OpenAL itself. lime includes all the source to OpenAL in project/lib/openal-android, but this apparently doesn’t get built. The Android OpenAL binaries are included in ndll/Android and legacy/ndll/Android.

How are these built? I see the commit comment for one is “Update Android OpenAL libs (thanks Danny Yaroslavski)” Are these just built completely outside of the lime/openfl/haxe environment? If so, how? The README at https://github.com/native-toolkit/openal-android says that this is the Android specific OpenAL source, but doesn’t give any hints on how to build it. Does anyone know what the procedure is?

Thank you!

I’ve made some progress on this. I’m not sure why a precompiled binary was being used, so I switched it to build the source and just include it in liblime like everything else. Now I’m able to rebuild lime for android without the precompiled binaries.

I’m still having a problem when I try to run it though. Then dalvik tells me:

E/dalvikvm(22609): dlopen("/mnt/asec/com.sample.project-24/lib/liblime.so") failed: dlopen failed: could not load library "libopenal.so" needed by "liblime.so"; caused by library "libopenal.so" not found

So apparently I’ve still missed a reference somewhere. But hopefully I can get this all working, cleaned up, and a pull request submitted tomorrow.

Look for references in “include.xml” files to include OpenAL, you may also have to check the legacy Lime template for Android to make sure it is not explicitly included as a lib load

I finally got it working. After hours of trying to figure out how it was still referencing libopenal.so even though it didn’t exist, I finally realized I forgot to rebuild with -Dlegacy.

facepalm

Now it works. I’ll clean it up and submit it. It needs someone with a better sense of the entire build system than I to make sure I didn’t break anything else.

I’ve got it all “working” now. However, I see the HXCPP_X86 build is different. I haven’t tested with that. What is it and how can I test it?

Thanks!