I have been using the FMod library for a published Android game. The library behaves perfectly so far, but when I try to install the game’s apk to Amazon Kindle Fire, the sound comes out distorted, as if it is played in slow motion with a lot of wobbling noise.

The game has been tested on several Android phones and tablets, loaded with Android 2.1 to 4.0 and the sound plays fine. It has also been tested on several Android Smart TVs without any problem as well, so there must be something going on with the Amazon Kindle Fire version of Android.

Has anyone tried FMod with Amazon Kindle Fire? Note that I am using the latest stable Android FMod build.

Thanks alot!

  • You must to post comments

It’s safe to always use AudioTrack for Android devices, it offers the lowest possible latency on the platform. You only really need OpenSL if you want to do recording.

  • You must to post comments

Well, yeah, I need to record as well… are these mutually exclusive?

  • You must to post comments

Yes our AudioTrack implementation does not support recording, for recording you must use OpenSL.

To overcome stuttering audio on Kindle Fire with OpenSL you will need to experiment with System::setDSPBufferSize, increasing the buffer size or buffer count until the stuttering goes away.

  • You must to post comments

We had the same problem on both the Kindle Fire and NOOK. It seems to be an issue with their OpenSL respective implementations. To solve it we used

  • You must to post comments

Thanks alot for tip!

Now it works!

  • You must to post comments

The Kindle Fire has known latency issues, this is primarily a device / API issue. As recommended by vectorunit, Audio Track is your best bet, due to how buffering works for this API compared with OpenSL we are able to deliver a more stable output.

  • You must to post comments

Yeah, having some problems with the Kindle Fire along the same lines. I get the same very laggy, juddering sound when I play something back on this platform.

Unfortunately, the listed fix doesn’t work for me. In one instance, if I place this directly after the System_Create call
result = FMOD::System_Create(&_pFmodSystem);

    result = _pFmodSystem->setOutput(FMOD_OUTPUTTYPE_AUDIOTRACK);

I literally now hear nothing, and if I place it after the

[code:1u7v3750]result = _pFmodSystem->init(32, FMOD_INIT_NORMAL, NULL);[/code:1u7v3750]

The entire app crashes with the following log output.

W/ASFDummyExtractor(31116): ASF parser is not available
I/DEBUG (31112): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG (31112): Build fingerprint: ‘generic/blaze/blaze:2.3.4/GINGERBREAD/6.3.1_user_4107920:user/release-keys’
I/DEBUG (31112): pid: 31116, tid: 31126 >>> org.cocos2dx.application <<<
I/DEBUG (31112): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
I/DEBUG (31112): r0 00000027 r1 deadbaad r2 a0000000 r3 00000000
I/DEBUG (31112): r4 00000001 r5 00000000 r6 81354690 r7 46a9bf44
I/DEBUG (31112): r8 46b9bb40 r9 46a9bf3c 10 46a9bf28 fp 800a5368
I/DEBUG (31112): ip afd46668 sp 46b9ba48 lr afd19781 pc afd1624c cpsr 60000130
I/DEBUG (31112): d0 444f4d46284b4345 d1 29544c555345525f
I/DEBUG (31112): d2 6567616e614d646e d3 48435252453a3a72
I/DEBUG (31112): d4 6e3ac5258925c195 d5 995cbc3aaec13e8e
I/DEBUG (31112): d6 9925a539f9c5a941 d7 0000000000000000
I/DEBUG (31112): d8 0000000000000000 d9 0000000000000000
I/DEBUG (31112): d10 0000000000000000 d11 0000000000000000
I/DEBUG (31112): d12 0000000000000000 d13 0000000000000000
I/DEBUG (31112): d14 0000000000000000 d15 0000000000000000
I/DEBUG (31112): d16 3ff0000000000000 d17 3f696b8927e8efc4
I/DEBUG (31112): d18 3feb9d189b427fc0 d19 3fc18b9d92f60100
I/DEBUG (31112): d20 0000000000000000 d21 3f872e5c54a96637
I/DEBUG (31112): d22 3e21e7c5992989f4 d23 bda8fae9be8838d4
I/DEBUG (31112): d24 3fc74721cad6b0ed d25 3fc39a09d078c69f
I/DEBUG (31112): d26 0000000000000000 d27 0000000000000000
I/DEBUG (31112): d28 0000000000000000 d29 0000000000000000
I/DEBUG (31112): d30 0000000000000000 d31 0000000000000000
I/DEBUG (31112): scr 20000012
I/DEBUG (31112):
D/AudioResampler( 1306): forcing AudioResampler quality to 2
D/Omap4ALSA( 1306): open called for devices 00000002 in mode 0 channels 00000000...
I/Omap4ALSA( 1306): Using ping-pong!
I/Omap4ALSA( 1306): Buffer size: 4096
I/Omap4ALSA( 1306): Latency: 92879
I/DEBUG (31112): #00 pc 0001624c /system/lib/libc.so
I/DEBUG (31112): #01 pc 0001ced4 /system/lib/libc.so
I/DEBUG (31112): #02 pc 0011e8f4 /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): #03 pc 0011e824 /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): #04 pc 0011f232 /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): #05 pc 0011c7b6 /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): #06 pc 000e1a70 /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): #07 pc 000e1bee /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): #08 pc 001abf6a /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): #09 pc 000e17e8 /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): #10 pc 00017e34 /system/lib/libdvm.so
I/DEBUG (31112): #11 pc 000496da /system/lib/libdvm.so
I/DEBUG (31112): #12 pc 0004ef2e /system/lib/libdvm.so
I/DEBUG (31112): #13 pc 0001d048 /system/lib/libdvm.so
I/DEBUG (31112): #14 pc 000220fc /system/lib/libdvm.so
I/DEBUG (31112): #15 pc 00020fec /system/lib/libdvm.so
I/DEBUG (31112): #16 pc 0005fd44 /system/lib/libdvm.so
I/DEBUG (31112): #17 pc 0005ff58 /system/lib/libdvm.so
I/DEBUG (31112): #18 pc 0005429e /system/lib/libdvm.so
I/DEBUG (31112): #19 pc 00011e38 /system/lib/libc.so
I/DEBUG (31112): #20 pc 00011a04 /system/lib/libc.so
I/DEBUG (31112):
I/DEBUG (31112): code around pc:
I/DEBUG (31112): afd1622c 2c006824 e028d1fb b13368db c064f8df
I/DEBUG (31112): afd1623c 44fc2401 4000f8cc 49124798 25002027
I/DEBUG (31112): afd1624c f7f57008 2106ea10 ebacf7f6 460aa901
I/DEBUG (31112): afd1625c f04f2006 95015380 95029303 eed2f7f5
I/Omap4ALSA( 1306): Initialized ALSA PLAYBACK device ‘plughw:0,0’
E/AudioHardwareALSA( 1306): RE-OPEN AFTER STANDBY:: took 85 msecs
I/DEBUG (31112): afd1626c 462aa905 f7f52002 f7f5eede 2106e9fc
I/DEBUG (31112):
I/DEBUG (31112): code around lr:
I/DEBUG (31112): afd19760 4a0e4b0d e92d447b 589c41f0 26004680
I/DEBUG (31112): afd19770 686768a5 f9b5e006 b113300c 47c04628
I/DEBUG (31112): afd19780 35544306 37fff117 6824d5f5 d1ef2c00
I/DEBUG (31112): afd19790 e8bd4630 bf0081f0 00027db4 ffffff90
I/DEBUG (31112): afd197a0 b086b570 f602fb01 9004460c a804a901
I/DEBUG (31112):
I/DEBUG (31112): stack:
I/DEBUG (31112): 46b9ba08 afd42664
I/DEBUG (31112): 46b9ba0c 000aa290
I/DEBUG (31112): 46b9ba10 0000003f
I/DEBUG (31112): 46b9ba14 afd18849 /system/lib/libc.so
I/DEBUG (31112): 46b9ba18 afd4270c
I/DEBUG (31112): 46b9ba1c afd426b8
I/DEBUG (31112): 46b9ba20 00000000
I/DEBUG (31112): 46b9ba24 afd19781 /system/lib/libc.so
I/DEBUG (31112): 46b9ba28 00000001
I/DEBUG (31112): 46b9ba2c 46b9ba5c
I/DEBUG (31112): 46b9ba30 81354690
I/DEBUG (31112): 46b9ba34 46a9bf44
I/DEBUG (31112): 46b9ba38 46b9bb40
I/DEBUG (31112): 46b9ba3c afd18aa3 /system/lib/libc.so
I/DEBUG (31112): 46b9ba40 df002777
I/DEBUG (31112): 46b9ba44 e3a070ad
I/DEBUG (31112): #00 46b9ba48 46a9bf3c
I/DEBUG (31112): 46b9ba4c 46a9bf28
I/DEBUG (31112): 46b9ba50 800a5368
I/DEBUG (31112): 46b9ba54 afd18dc9 /system/lib/libc.so
I/DEBUG (31112): 46b9ba58 afd426b8
I/DEBUG (31112): 46b9ba5c fffffbdf
I/DEBUG (31112): 46b9ba60 afd1ced5 /system/lib/libc.so
I/DEBUG (31112): 46b9ba64 afd3b581 /system/lib/libc.so
I/DEBUG (31112): 46b9ba68 812cdadc /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): 46b9ba6c afd1ced9 /system/lib/libc.so
I/DEBUG (31112): #01 46b9ba70 00000364
I/DEBUG (31112): 46b9ba74 812cdce4 /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): 46b9ba78 812cdce4 /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): 46b9ba7c 812cdce4 /data/data/org.cocos2dx.application/lib/libspynetliedetector.so
I/DEBUG (31112): 46b9ba80 0020bbe8
I/DEBUG (31112): 46b9ba84 8111e8f7 /data/data/org.cocos2dx.application/lib/libspynetliedetector.so[/code:1u7v3750]

Needless to say, this is a problem.


  • You must to post comments

When using AudioTrack you must also initialize and start the FMOD Java component, see FMODAudioDevice in the examples. Placing the System::setOutput call after System::init will return an error (it’s a pre-init function only). The ‘crash’ you are seeing is probably the exit(-1) caused by CHECK_RESULT.

  • You must to post comments

Ok, found the code.

Now, how do I know if I need to turn this on or not? I’m presuming this is not something I want on all the time – how do I determine that yes, this is an Android Device that needs this turned on?

  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.