I'm writing an Android application that uses a Buffer Queue Audio Player via OpenSL ES. My application runs just fine on recent devices but I'm having troubles with the HTC Wildfire S.
In particular, calling the slCreateEngine functions produces a SL_RESULT_RESOURCE_ERROR. There isn't a lot of information in the documentation about this error.
Right before that call to slCreateEngine, I am also seeing these errors in LogCat:
- Failed to open MM_PARSER_LIB, dlerror = Cannot load library: load_library[1105]: Library 'libmmparser.so' not found
- Failed to open MM_PARSER_LITE_LIB, dlerror = Cannot load library: load_library[1105]: Library 'libmmparser_lite.so' not found
Some theories I have:
- The device is too memory-constrained to instantiate the engine object
- The device does not support OpenSL ES audio interface (this thread suggests that not all devices support it: https://groups.google.com/forum/#!topic/android-ndk/Px-7NvaLmjo)
The specs on the HTC Wildfire S are as follows:
- Android 2.3.4 (as far as I can take it through carrier updates)
- Qualcomm MSM7227 (ARMv6 processor)
- 512MB RAM
I know that Open SL ES is supported as of Gingerbread, but that doesn't mean all devices have the capability. Due to other requirements for this application, I must handle by audio processing and playback with NDK and cannot use Media Player or AudioTrack.
Questions:
- Does anyone know what could be causing the reported error on this device?
- Is there a way of figuring out what devices are compatible with OpenSL ES?
- Are ARMv6 devices necessarily incompatible with OpenSL ES?
EDIT See my comments to HerrLip
- NativeAudio example from the NDK folder runs on this device and slCreateEngine is executed successfully. This eliminates my suspicions that the device and other ARMv6 devices are not supported.
- The libmmparser.so and libmmparser_lite.so libraries still cannot be loaded in the NativeAudio example, but this does not seem to be the problem as it works on the device.
- My application has quite a bit more going on than the NativeAudio example. Perhaps memory constraints are preventing the slCreateEngine function call from getting the required resources.