Is calling org.fmod.FMOD.init(this) always recommended on Android?

I found the following from the starter guide here.

“It is also highly recommended that you initialize the FMOD Java component, this will allow loading assets from the APK and automatic configuration for lowest latency.”

This seems to be helpful when I put my audio files in the folder named ‘assets’ of my android project, right?

But what if I don’t need to load files from that folder at all?

I’m planning to make an audio player, so all the audio resources will be on the user’s sdcard.

Is it still necessary to call the init() method in this case?

One more question.

What will happen if I don’t call close() method in onDestroy()?

Does close() have something to do with the unmanaged heap?

If not, I think everything will be destroyed and garbage collected on destroy automatically,
even though it’s not nicely written code, I know…

Hello Jiyong,

It is required that you initialize the Java component for the automatic low-latency configuration, regardless of the location of the users assets.

It is recommended that you call org.fmod.FMOD.close in the activity onDestroy method to match the call to org.fmod.FMOD.init in your onCreate method. It isn’t required, however this could change in future releases so it is best to call these to save the hassle later.


1 Like

Thanks, This helped a lot!