Setting up FMOD for Android

279 views
Skip to first unread message

Arne Nykänen

unread,
May 11, 2016, 9:57:16 AM5/11/16
to android-ndk

I am trying to set up FMOD for Android, and have started with the examples provided in the API for FMOD. I have not managed to set up a working project. However, I have downloaded a working project for Android Studio from here: https://github.com/WillCoder/Fmod-Sample-3d
I can build and run this project. The example implemented is event_parameter.cpp. The c++ files are not included in the project. There are only prebuilt shared libraries. Therefore, I though a good way to start would be to build new shared libraries from another example file in the FMOD API (simple_event.cpp) and exchange the ones in the working project. I have tried to compile new .so files using NDK, but I have not managed to get it working. I assume something is wrong with the Android.mk file or the project structure. I have searched for other questions on the topic in the FMOD forum, and in some answers there are references to examples of Android.mk in the API, but I haven’t found any examples in the latest FMOD API (1.08). However, I have modified the Android.mk from the FMOD API 1.04:


LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := simple_event
LOCAL_SRC_FILES := simple_event.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/inc
include $(BUILD_SHARED_LIBRARY)


I get lots of “undefined reference to” errors in simple_event.cpp, e.g. to Common_Init(void), FMOD::Studio::System::create(FMOD::Studio::System, unsigned int), etc.
Any ideas about what is wrong? Does anyone know of any example of project structures and Android.mk files for the use of FMOD with Android?

Arne Nykänen

unread,
May 16, 2016, 12:57:23 PM5/16/16
to android-ndk
I posted the question to FMOD's forum as well, and got a good answer there. Anyone interested can find it here: http://www.fmod.org/questions/question/setting-up-fmod-for-android-examples-of-android-mk-and-project-structures-for-ndk/
Reply all
Reply to author
Forward
0 new messages