0
0

Hey folks,

I have fmod integrated into an android build, but the app crashes when I call:
[code:231vpix6]_pFmodSystem->init(32, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE, NULL);[/code:231vpix6]

Right after the crash, the log output reports:
[code:231vpix6]11-21 15:21:55.287: V/ExtendedExtractor(11496): Failed to open MM_PARSER_LIB, dlerror = Cannot load library: load_library[1105]: Library ‘libmmparser.so’ not found
11-21 15:21:55.287: V/ExtendedExtractor(11496): Failed to open MM_PARSER_LITE_LIB, dlerror = Cannot load library: load_library[1105]: Library ‘libmmparser_lite.so’ not found
[/code:231vpix6]

In my build setup, I did NOT do the Java Initialization, found in the "Getting started with Fmod for Android.pdf", as my understanding is that this is only necessary if you want to use Audio Track. Instead, I’m planning on using OpenSL if possible, and so my build setup is targeted for Android 2.3.3 (the minimum needed for OpenSL, as I understand it).

So…can anybody tell me what I might be doing wrong with my build setup, or why I am getting this crash when initializing fmod? Hopefully the above is enough context, but I’m happy to provide more details. Thanks in advance for any help!

  • You must to post comments
0
0

Ooops! I posted this in the wrong forum. 😳
Can a moderator please move this? thanks!

  • You must to post comments
0
0

[quote="domowicz":1ydqrv4q]Ooops! I posted this in the wrong forum. 😳
Can a moderator please move this? thanks![/quote:1ydqrv4q]

Fixed that for you :-)

  • You must to post comments
0
0

libmmparser.so isn’t anything related to FMOD, we don’t link that into our .so, is it something you link in your app?

You only need to create and initialize the FMODAudioDevice class if you want to use AudioTrack, however you still need that static section which loads the FMOD .so before your application .so regardless of output choice.

Is System::init returning an error code? or is it crashing inside the function call?

  • You must to post comments
0
0

[quote:344mfipz]libmmparser.so isn’t anything related to FMOD, we don’t link that into our .so, is it something you link in your app?[/quote:344mfipz]
My application is using Cocos2d-x, but this error is only reported when I run fmod’s System::init. If I comment out System::init, the app launches and runs just fine (with no audio, of course). Very strange…I wonder what this means.

[quote:344mfipz]You only need to create and initialize the FMODAudioDevice class if you want to use AudioTrack, however you still need that static section which loads the FMOD .so before your application .so regardless of output choice.
[/quote:344mfipz]
Right. And do you know, was I correct above in assuming that I need to target Android 2.3.3 if I don’t use AudioTrack?
As for the static load, I had added the following to the Java bootstrap code:
[code:344mfipz]
static {

     System.loadLibrary("fmodex"); //  <----------- This is the line I added
     System.loadLibrary("helloworld");

 }

[/code:344mfipz]
Not sure if this matters, but I should probably also mention that my app is all C++ native code.

[quote:344mfipz]Is System::init returning an error code? or is it crashing inside the function call?[/quote:344mfipz]
I should have thought to check this earlier! Here is what it says after System::init crashes:
[code:344mfipz]FMOD error! (43) Not enough memory or resources.[/code:344mfipz]
I’ll look into this more on my end, but I don’t see how my device (HTC Evo, with 512mB ram) could actually be running out of memory.

  • You must to post comments
0
0

I was able to solve the problem. Here’s what I did:

Previously, I had this:
[code:2jt4fj2y]_pFmodSystem->init(32, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE, NULL);[/code:2jt4fj2y]

I changed it to this:
[code:2jt4fj2y]_pFmodSystem->init(32, FMOD_INIT_NORMAL, NULL);[/code:2jt4fj2y]

And now it no longer crashes. As an aside, I realized that my ERRCHECK function calls assert(false), which may be the only reason the app was crashing. That is, I’m not convinced that the failed use of FMOD_INIT_ENABLE_PROFILE is necessarily fatal.

Now, I’m having trouble locating the sound effect assets (createSound fails). :b But at least I can launch the app with fmod now!

  • You must to post comments
0
0

Yes, to not use AudioTrack you will need Android API level 9 (which is 2.3 or higher).

It’s possible that the network APIs which support the profiler are failing causing that error, do you have the INTERNET permission set in your Android manifest?

  • You must to post comments
0
0

I don’t have anything Internet related in the AndroidManifest.xml. So nothing specifically enables or disables Internet permission for me. Also, my handset is serviceless, so I don’t get cell data. However, I do have it connected to WiFi.

Not sure if the above tells you anything. For my specific purposes at least, I don’t need this problem resolved.

Oh, and for your reference, here is the contents of my AndroidManifest.xml:

[code:2i1go1bw]
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.cocos2dx.application"
android:versionCode="1"
android:versionName="1.0">

&lt;uses-sdk android:minSdkVersion=&quot;10&quot;/&gt;

&lt;application android:label=&quot;@string/app_name&quot;
    android:debuggable=&quot;true&quot;
    android:icon=&quot;@drawable/icon&quot;&gt;

    &lt;activity android:name=&quot;.ApplicationDemo&quot;
              android:label=&quot;@string/app_name&quot;
              android:screenOrientation=&quot;landscape&quot;
              android:theme=&quot;@android:style/Theme.NoTitleBar.Fullscreen&quot;
              android:configChanges=&quot;orientation&quot;&gt;
        &lt;intent-filter&gt;
            &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
            &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
&lt;/application&gt;
&lt;supports-screens android:largeScreens=&quot;true&quot;
                  android:smallScreens=&quot;true&quot;
                  android:anyDensity=&quot;true&quot;
                  android:normalScreens=&quot;true&quot;/&gt;

</manifest>
[/code:2i1go1bw]

  • You must to post comments
0
0

For anyone affected by this, try adding the following to your AndroidManifest.xml, you can see a demonstration of this with our netstream example.

[code:3d59g01v]<uses-permission android:name="android.permission.INTERNET"></uses-permission>[/code:3d59g01v]

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.