Friday, August 10, 2012

OpenSL ES for Android - SL_RESULT_CONTENT_UNSUPPORTED

If you're getting a SL_RESULT_CONTENT_UNSUPPORTED result from OpenSL like this:

E/AudioRecord( 2108): AudioFlinger could not create record track, status: -1
E/libOpenSLES( 2108): android_audioRecorder_realize(0x1cde560) error creating AudioRecord object
W/libOpenSLES( 2108): Leaving Object::Realize (SL_RESULT_CONTENT_UNSUPPORTED)

look a bit higher in the log. The solution might be staring you in the face:

W/ServiceManager(   81): Permission failure: android.permission.RECORD_AUDIO from uid=10078 pid=2108
E/AudioFlinger(   81): Request requires android.permission.RECORD_AUDIO

No comments: