diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..daaea46 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +/lib +/obj diff --git a/Alc/alcandroid.c b/Alc/alcandroid.c index edfaeb3..1797850 100644 --- a/Alc/alcandroid.c +++ b/Alc/alcandroid.c @@ -12,6 +12,20 @@ JavaVM *alcGetJavaVM(void) { return javaVM; } +void alcandroid_OnLoad( JavaVM *vm ) { + BackendFuncs func_list; + if (apportableOpenALFuncs.alc_android_set_java_vm) { + apportableOpenALFuncs.alc_android_set_java_vm(vm); + } + javaVM = vm; +} + +void alcandroid_OnUnload( JavaVM *vm ) { + if (apportableOpenALFuncs.alc_android_set_java_vm) { + apportableOpenALFuncs.alc_android_set_java_vm(NULL); + } +} + //when called as a shared lib, this is automatic //but when embedding it that will be an error #ifdef NATIVE_TOOLKIT_OPENAL_ANDROID_SHARED @@ -27,29 +41,14 @@ JavaVM *alcGetJavaVM(void) { #endif //NATIVE_TOOLKIT_OPENAL_ANDROID_SHARED - -void alcandroid_OnLoad( JavaVM *vm ) { - BackendFuncs func_list; - if (apportableOpenALFuncs.alc_android_set_java_vm) { - apportableOpenALFuncs.alc_android_set_java_vm(vm); - } - javaVM = vm; -} - -void alcandroid_OnUnload( JavaVM *vm ) { - if (apportableOpenALFuncs.alc_android_set_java_vm) { - apportableOpenALFuncs.alc_android_set_java_vm(NULL); - } -} - -void alcandroid_Suspend() { +__attribute__((visibility("protected"))) void alcandroid_Suspend() { LOGV("openal suspend"); if (apportableOpenALFuncs.alc_android_suspend) { apportableOpenALFuncs.alc_android_suspend(); } } -void alcandroid_Resume() { +__attribute__((visibility("protected"))) void alcandroid_Resume() { LOGV("openal resume"); if (apportableOpenALFuncs.alc_android_resume) { apportableOpenALFuncs.alc_android_resume(); diff --git a/build-shared.sh b/build-shared.sh new file mode 100755 index 0000000..d63e789 --- /dev/null +++ b/build-shared.sh @@ -0,0 +1,5 @@ +rm -rf obj +haxelib run hxcpp library.xml -Dandroid +haxelib run hxcpp library.xml -Dandroid -DHXCPP_ARMV7 +haxelib run hxcpp library.xml -Dandroid -DHXCPP_ARM64 +haxelib run hxcpp library.xml -Dandroid -DHXCPP_X86 \ No newline at end of file diff --git a/files.xml b/files.xml index 449d020..073f9ca 100644 --- a/files.xml +++ b/files.xml @@ -9,6 +9,7 @@ + diff --git a/include/config.h b/include/config.h index 7897bcc..0ba400d 100755 --- a/include/config.h +++ b/include/config.h @@ -5,6 +5,7 @@ #define ALSOFT_VERSION "1.12.854" #define AL_BUILD_LIBRARY +#define HAVE_GCC_VISIBILITY /* Define if we have the Android backend */ #if defined(ANDROID) @@ -89,6 +90,27 @@ /* Define if we have the __int64 type */ /* #cmakedefine HAVE___INT64 */ +#ifdef HXCPP_ARM64 + + /* Define to the size of a void pointer type */ + #define SIZEOF_VOIDP 8 + +#else + + #ifdef HXCPP_X86_64 + + /* Define to the size of a void pointer type */ + #define SIZEOF_VOIDP 8 + + #else + + /* Define to the size of a void pointer type */ + #define SIZEOF_VOIDP 4 + + #endif + +#endif + /* Define to the size of a long int type */ #define SIZEOF_LONG 4 @@ -98,9 +120,6 @@ /* Define to the size of an unsigned int type */ #define SIZEOF_UINT 4 -/* Define to the size of a void pointer type */ -#define SIZEOF_VOIDP 4 - /* Define if we have GCC's destructor attribute */ #define HAVE_GCC_DESTRUCTOR 1 diff --git a/library.xml b/library.xml index a0aaa9a..ee1b484 100644 --- a/library.xml +++ b/library.xml @@ -35,6 +35,7 @@ +