0

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 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:

  1. Does anyone know what could be causing the reported error on this device?
  2. Is there a way of figuring out what devices are compatible with OpenSL ES?
  3. 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.
rmigneco
  • 595
  • 4
  • 16

1 Answers1

0
  1. According to the docs, that error code means "Operation failed due to a lack of resources (usually a result of object realization)." So, I'd assume you're right about constraints.

  2. You could try somebody else's app and see what happens. (Try https://code.google.com/p/high-performance-audio/source/browse/audio-buffer-size )

  3. I don't know

HerrLip
  • 151
  • 3
  • Good idea. Its strange, I tried the NativeAudio sample located in the NDK folder and that works fine. There is no similar failure when calling the slCreateEngine command. – rmigneco Oct 02 '13 at 14:23
  • Also, I still do see the same errors when loading 'libmmparser.so' and 'libmmparser_lite.so'. – rmigneco Oct 02 '13 at 14:23
  • What arguments are you giving to slCreateEngine()? – HerrLip Oct 03 '13 at 17:34
  • Also, the library errors really sounds like a linking problem or issue with setting the processor options, if that helps. – HerrLip Oct 03 '13 at 18:50
  • I'm calling that function as follows: result = slCreateEngine(&engineObject, 0, NULL, 0, NULL, NULL) – rmigneco Oct 04 '13 at 15:18
  • This is also the same way its called in the NDK NativeAudio sample. Like I said, I'm getting the same library errors in that code as well, so I don't think they're part of the greater problem. – rmigneco Oct 04 '13 at 15:18