opensl es Unsupported feature

1,084 views
Skip to first unread message

beast

unread,
Mar 16, 2012, 7:52:38 AM3/16/12
to android-ndk
I'm trying to get the AudioCapabilities of my device but I'm getting
this result... Anyone experienced this issue before?

Glenn Kasten

unread,
Mar 16, 2012, 10:11:06 AM3/16/12
to andro...@googlegroups.com
I assume you mean SLAudioIODeviceCapabilitiesItf, SLAudioDecoderCapabilitiesItf, or SLAudioEncoderCapabilitiesItf. Those are not supported.  See $NDK/docs/opensles/index.html section "

Supported features from OpenSL ES 1.0.1", subsection "Objects and interfaces". Those 3 interfaces are not listed and so are not supported.

beast

unread,
Mar 16, 2012, 10:43:48 AM3/16/12
to android-ndk
i don't understand the concept of "supported features".

I'm trying to do a simple thing such as:

SLresult res;
SLObjectItf sl;

/* Create OpenSL ES engine in thread-safe mode */
SLEngineOption EngineOption[] = { (SLuint32)
SL_ENGINEOPTION_THREADSAFE, (SLuint32) SL_BOOLEAN_TRUE };
res = slCreateEngine( &sl, 1, EngineOption, 0, NULL, NULL);
CheckErr(res);

/* Realizing the SL Engine in synchronous mode. */
res = (*sl)->Realize(sl, SL_BOOLEAN_FALSE);
CheckErr(res);

SLAudioIODeviceCapabilitiesItf audio_capabilities;

/* Get the Audio IO DEVICE CAPABILITIES interface, which is also
implicit */
res = (*sl)->GetInterface(sl, SL_IID_AUDIOIODEVICECAPABILITIES, (void
*)&audio_capabilities);
CheckErr(res);

If this isn't possible, what is possible then? :\

beast

unread,
Mar 20, 2012, 5:57:56 AM3/20/12
to andro...@googlegroups.com
Anyone?

James Woodbridge

unread,
Mar 20, 2012, 5:58:56 AM3/20/12
to andro...@googlegroups.com
This is a bit vague, is this an error you are getting?

On Tue, Mar 20, 2012 at 9:57 AM, beast <filipe.oli...@gmail.com> wrote:
Anyone?

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/TK7UL9-zcbgJ.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

beast

unread,
Mar 20, 2012, 6:49:43 AM3/20/12
to andro...@googlegroups.com
lol this is the error:


        SLresult res;
        SLObjectItf sl;

        /* Create OpenSL ES engine in thread-safe mode */
        SLEngineOption EngineOption[] = { (SLuint32)
SL_ENGINEOPTION_THREADSAFE, (SLuint32) SL_BOOLEAN_TRUE };
        res = slCreateEngine( &sl, 1, EngineOption, 0, NULL, NULL);
        CheckErr(res);

        /* Realizing the SL Engine in synchronous mode. */
        res = (*sl)->Realize(sl, SL_BOOLEAN_FALSE);
        CheckErr(res);

        
SLAudioIODeviceCapabilitiesItf audio_capabilities;

        /* Get the Audio IO DEVICE CAPABILITIES interface, which is also
        implicit */
        res = (*sl)->GetInterface(sl, SL_IID_AUDIOIODEVICECAPABILITIES, (void
*)&audio_capabilities);
        CheckErr(res);

res returns UNSUPPORTED_FEATURE


On Tuesday, March 20, 2012 9:58:56 AM UTC, James Woodbridge wrote:
This is a bit vague, is this an error you are getting?

On Tue, Mar 20, 2012 at 9:57 AM, beast <filipe.oliveira.sousa@gmail.com> wrote:
Anyone?

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/TK7UL9-zcbgJ.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe@googlegroups.com.

James Woodbridge

unread,
Mar 20, 2012, 7:06:15 AM3/20/12
to andro...@googlegroups.com
Im literally starting OpenSL today but if my openGLES knowledge is anything to go by then it sounds like SL_IID_AUDIOIODEVICECAPABILITI
ES isnt supported by the hardware on your device. Usually you have to query the hardware implementation to find out its hardware capabilities.

I will need to clarify this when i read bit further so bare with me.  Or if someone else could back me up or shoot me down that would be useful too :)


To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/OUxGKao6SNEJ.

To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.

beast

unread,
Mar 22, 2012, 10:53:25 AM3/22/12
to andro...@googlegroups.com
And do you know how can I query the hardware capabilities?




On Tuesday, March 20, 2012 11:06:15 AM UTC, James Woodbridge wrote:
Im literally starting OpenSL today but if my openGLES knowledge is anything to go by then it sounds like SL_IID_AUDIOIODEVICECAPABILITI
ES isnt supported by the hardware on your device. Usually you have to query the hardware implementation to find out its hardware capabilities.

I will need to clarify this when i read bit further so bare with me.  Or if someone else could back me up or shoot me down that would be useful too :)


James Woodbridge

unread,
Mar 22, 2012, 11:23:34 AM3/22/12
to andro...@googlegroups.com
Has to be something like QueryAudioOutputCapabilities see the Khronos spec card for the API breakdown and work out which one tells you what support there is :www.khronos.org/files/opensl-es-1-1-quick-reference.pdf

To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/x13-ESlyBj8J.

To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.

beast

unread,
Mar 23, 2012, 6:25:10 AM3/23/12
to andro...@googlegroups.com
You are suggesting something like:

    res = (*AudioIODeviceCapabilitiesItf)->QueryAudioOutputCapabilities(AudioIODeviceCapabilitiesItf, OutputDeviceIDs[i], &AudioOutputDescriptor);

However, to do such query we previously need the AudioIODeviceCapabilitiesItf:

    res = (*sl)->GetInterface(sl, SL_IID_AUDIOIODEVICECAPABILITIES, (void *)&AudioIODeviceCapabilitiesItf);

This is exactly where I'm having problems. "res" return UNSUPPORTED_FEATURE :\


On Thursday, March 22, 2012 3:23:34 PM UTC, James Woodbridge wrote:
Has to be something like QueryAudioOutputCapabilities see the Khronos spec card for the API breakdown and work out which one tells you what support there is :www.khronos.org/files/opensl-​es-1-1-quick-reference.pdf

James Woodbridge

unread,
Mar 23, 2012, 7:22:33 AM3/23/12
to andro...@googlegroups.com
Hmm i see your issue, can you get a spec of the device your testing on ? It sounds like the device hasn't got OpenSL ES hardware in it. Simpley, whats the device?

To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/dhjT68ip_oYJ.

To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.

beast

unread,
Mar 23, 2012, 7:28:00 AM3/23/12
to andro...@googlegroups.com
Sony Ericsson XPERIA Arc


On Friday, March 23, 2012 11:22:33 AM UTC, James Woodbridge wrote:
Hmm i see your issue, can you get a spec of the device your testing on ? It sounds like the device hasn't got OpenSL ES hardware in it. Simpley, whats the device?

James Woodbridge

unread,
Mar 23, 2012, 7:37:03 AM3/23/12
to andro...@googlegroups.com
I cant find the device spec for this, but id strongly believe that OpenSL ES isnt supported on te device. You will need to look into this further.



To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/0XFxCwK8gsgJ.

To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.

Glenn Kasten

unread,
Mar 24, 2012, 9:56:09 AM3/24/12
to android-ndk
Please re-read my 3/16 reply, especially this: "Those 3 interfaces are
not listed and so are not supported."

On Mar 23, 4:37 am, James Woodbridge <james.woodbri...@gmail.com>
wrote:
> I cant find the device spec for this, but id strongly believe that OpenSL
> ES isnt supported on te device. You will need to look into this further.
>
> On Fri, Mar 23, 2012 at 11:28 AM, beast <filipe.oliveira.so...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Sony Ericsson XPERIA Arc
>
> > On Friday, March 23, 2012 11:22:33 AM UTC, James Woodbridge wrote:
>
> >> Hmm i see your issue, can you get a spec of the device your testing on ?
> >> It sounds like the device hasn't got OpenSL ES hardware in it. Simpley,
> >> whats the device?
>
> >> On Fri, Mar 23, 2012 at 10:25 AM, beast <filipe.oliveira.sousa@gmail.​com<filipe.oliveira.so...@gmail.com>
> >> > wrote:
>
> >>> You are suggesting something like:
>
> >>>     res =
> >>> (*​AudioIODeviceCapabilitiesItf)-​>QueryAudioOutputCapabilities(​AudioIODev iceCapabilitiesItf,
> >>> OutputDeviceIDs[i], &AudioOutputDescriptor);
>
> >>> However, to do such query we previously need the
> >>> AudioIODeviceCapabilitiesItf:
>
> >>>     res = (*sl)->GetInterface(sl, SL_IID_​AUDIOIODEVICECAPABILITIES,
> >>> (void *)&​AudioIODeviceCapabilitiesItf);
>
> >>> This is exactly where I'm having problems. "res" return
> >>> UNSUPPORTED_FEATURE :\
>
> >>> On Thursday, March 22, 2012 3:23:34 PM UTC, James Woodbridge wrote:
>
> >>>> Has to be something like QueryAudioOutputCapabilities see the Khronos
> >>>> spec card for the API breakdown and work out which one tells you what
> >>>> support there is :www.khronos.org/files/*opensl*
> >>>> -​​es-1-1-quick-reference.pdf
>
> >>>> On Thu, Mar 22, 2012 at 2:53 PM, beast <
> >>>> filipe.oliveira.sousa@gmail.​​com <filipe.oliveira.so...@gmail.com>>wrote:
>
> >>>>> And do you know how can I query the hardware capabilities?
>
> >>>>> On Tuesday, March 20, 2012 11:06:15 AM UTC, James Woodbridge wrote:
>
> >>>>>> Im literally starting OpenSL today but if my openGLES knowledge is
> >>>>>> anything to go by then it sounds like SL_IID_AUDIOIODEVICECAPABILITI
> >>>>>> ES isnt supported by the hardware on your device. Usually you have to
> >>>>>> query the hardware implementation to find out its hardware capabilities.
>
> >>>>>> I will need to clarify this when i read bit further so bare with me.
> >>>>>> Or if someone else could back me up or shoot me down that would be useful
> >>>>>> too :)
>
> >>>>>> On Tue, Mar 20, 2012 at 10:49 AM, beast <filipe.oliveira.sousa@gmail.
> >>>>>> **c​​om <filipe.oliveira.so...@gmail.com>> wrote:
>
> >>>>>>> lol this is the error:
>
> >>>>>>>         SLresult res;
> >>>>>>>         SLObjectItf sl;
>
> >>>>>>>         /* Create OpenSL ES engine in thread-safe mode */
> >>>>>>>         SLEngineOption EngineOption[] = { (SLuint32)
> >>>>>>> SL_ENGINEOPTION_THREADSAFE, (SLuint32) SL_BOOLEAN_TRUE };
> >>>>>>>         res = slCreateEngine( &sl, 1, EngineOption, 0, NULL, NULL);
> >>>>>>>         CheckErr(res);
>
> >>>>>>>         /* Realizing the SL Engine in synchronous mode. */
> >>>>>>>         res = (*sl)->Realize(sl, SL_BOOLEAN_FALSE);
> >>>>>>>         CheckErr(res);
>
> >>>>>>> **SLAudioIODeviceCapabilitiesItf audio_capabilities;
>
> >>>>>>>         /* Get the Audio IO DEVICE CAPABILITIES interface, which is
> >>>>>>> also
> >>>>>>>         implicit */
> >>>>>>>         res = (*sl)->GetInterface(sl, SL_IID_**
> >>>>>>> AUDIOIODEVICECAPABILITI**​​ES, (void
> >>>>>>> *)&audio_capabilities);
> >>>>>>>         CheckErr(res);
>
> >>>>>>> res returns UNSUPPORTED_FEATURE
>
> >>>>>>> On Tuesday, March 20, 2012 9:58:56 AM UTC, James Woodbridge wrote:
>
> >>>>>>>> This is a bit vague, is this an error you are getting?
>
> >>>>>>>> On Tue, Mar 20, 2012 at 9:57 AM, beast <
> >>>>>>>> filipe.oliveira.sousa@gmail.**c**​​om<filipe.oliveira.so...@gmail.com>
> >>>>>>>> > wrote:
>
> >>>>>>>>> Anyone?
>
> >>>>>>>>> --
> >>>>>>>>> You received this message because you are subscribed to the Google
> >>>>>>>>> Groups "android-ndk" group.
> >>>>>>>>> To view this discussion on the web visit
> >>>>>>>>>https://groups.google.com/d/**ms**​​g/android-ndk/-/TK7UL9-zcbgJ<https://groups.google.com/d/msg/android-ndk/-/TK7UL9-zcbgJ>
> >>>>>>>>> **.
> >>>>>>>>> To post to this group, send email to andro...@googlegroups.com.
> >>>>>>>>> To unsubscribe from this group, send email to
> >>>>>>>>> android-ndk+unsubscribe@**google**​​groups.com<android-ndk%2Bunsubscribe@go oglegroups.com>
> >>>>>>>>> .
> >>>>>>>>> For more options, visit this group athttp://groups.google.com/**
> >>>>>>>>> group**​​/android-ndk?hl=en<http://groups.google.com/group/android-ndk?hl=en>
> >>>>>>>>> .
>
> >>>>>>>>  --
> >>>>>>> You received this message because you are subscribed to the Google
> >>>>>>> Groups "android-ndk" group.
> >>>>>>> To view this discussion on the web visit
> >>>>>>>https://groups.google.com/d/**ms​​g/android-ndk/-/OUxGKao6SNEJ<https://groups.google.com/d/msg/android-ndk/-/OUxGKao6SNEJ>
> >>>>>>> **.
> >>>>>>> To post to this group, send email to andro...@googlegroups.com.
> >>>>>>> To unsubscribe from this group, send email to
> >>>>>>> android-ndk+unsubscribe@**google​​groups.com<android-ndk%2Bunsubscribe@goog legroups.com>
> >>>>>>> .
> >>>>>>> For more options, visit this group athttp://groups.google.com/**
> >>>>>>> group​​/android-ndk?hl=en<http://groups.google.com/group/android-ndk?hl=en>
> >>>>>>> .
>
> >>>>>>  --
> >>>>> You received this message because you are subscribed to the Google
> >>>>> Groups "android-ndk" group.
> >>>>> To view this discussion on the web visit
> >>>>>https://groups.google.com/d/​​msg/android-ndk/-/x13-ESlyBj8J<https://groups.google.com/d/msg/android-ndk/-/x13-ESlyBj8J>
> >>>>> ​​.
> >>>>> To post to this group, send email to andro...@googlegroups.com.
> >>>>> To unsubscribe from this group, send email to
> >>>>> android-ndk+unsubscribe@​​googlegroups.com<android-ndk%2Bunsubscribe@google groups.com>
> >>>>> .
> >>>>> For more options, visit this group at
> >>>>>http://groups.google.com/​​group/android-ndk?hl=en<http://groups.google.com/group/android-ndk?hl=en>
> >>>>> .
>
> >>>>  --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "android-ndk" group.
> >>> To view this discussion on the web visit
> >>>https://groups.google.com/d/​msg/android-ndk/-/dhjT68ip_oYJ<https://groups.google.com/d/msg/android-ndk/-/dhjT68ip_oYJ>
> >>> ​.
> >>> To post to this group, send email to andro...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> android-ndk+unsubscribe@​googlegroups.com<android-ndk%2Bunsubscribe@googleg roups.com>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/​group/android-ndk?hl=en<http://groups.google.com/group/android-ndk?hl=en>
> >>> .
Message has been deleted

beast

unread,
Mar 26, 2012, 11:36:11 AM3/26/12
to andro...@googlegroups.com
I don't understand the meaning of that....

Also, when I try this:                          SLEngineCapabilitiesItf engine_capabilities;      res = (*sl)->GetInterface(sl, SL_IID_ENGINECAPABILITIES, (void *)&engine_capabilities); CheckErr(res);

I get "unsupported feature" too :\
> > android-ndk+unsubscribe@googlegroups.com.

mic _

unread,
Mar 26, 2012, 11:57:22 AM3/26/12
to andro...@googlegroups.com
>>I don't understand the meaning of that....

It means you can't use it.

/Michael

On Mon, Mar 26, 2012 at 12:32 PM, beast <filipe.oli...@gmail.com> wrote:
I don't understand the meaning of that...

Also if I try something like:            SLEngineCapabilitiesItf engine_capabilities; res = (*sl)->GetInterface(sl, SL_IID_ENGINECAPABILITIES, (void *)&engine_capabilities); CheckErr(res);

It is not supported too.


On Saturday, March 24, 2012 1:56:09 PM UTC, Glenn Kasten wrote:
> > For more options, visit this group at
> >http://groups.google.com/​group/android-ndk?hl=en.
On Saturday, March 24, 2012 1:56:09 PM UTC, Glenn Kasten wrote:
> > For more options, visit this group at
> >http://groups.google.com/​group/android-ndk?hl=en.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/jjNPuHi0lYUJ.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

beast

unread,
Mar 27, 2012, 10:07:23 AM3/27/12
to andro...@googlegroups.com
Yes, but why? Is that an hardware problem? Software? Is there any device which support this? If so, which ones? The feature is implemented so I supposed it could be used.....

James Woodbridge

unread,
Mar 27, 2012, 10:47:53 AM3/27/12
to andro...@googlegroups.com
IT means that the device doesn't have the chip onboard so it isn't implemented. You need to find how the device natively handles audio.

On Tue, Mar 27, 2012 at 1:45 PM, beast <filipe.oli...@gmail.com> wrote:
Yes, but why? Is that an hardware limitation? Software limitation? Is this supported in other devices? If so, which ones? Why is this feature implemented if it can't be used?


On Monday, March 26, 2012 4:57:22 PM UTC+1, mic wrote:
>>I don't understand the meaning of that....

It means you can't use it.

/Michael

To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/1lOw1SKA-FsJ.

James Woodbridge

unread,
Apr 1, 2012, 8:15:05 AM4/1/12
to andro...@googlegroups.com
Ok i got round to writing the Cross platform sound component to our Engine today. In doing so i learned that "OpenSL ES" is only a specification requirement as of Android API Level 9 to device manufacuters so some devices wont ever support it........

Which is the approach to sound in the NDK. So if your device level API isn't 9 or above then your sound wont work. I am left to wonder if as OpenSL ES is a hardware specification that a lot of devices wont support sound using the NDK. I am going to stick with the idea that manufactures will support this and switch out sound on some devices. ALternatively make sure your device is up to date as manufacturers might provide as software soloution to this.

All smells a bit like J2ME to me tbh.

Glenn Kasten

unread,
Apr 2, 2012, 10:02:40 AM4/2/12
to andro...@googlegroups.com
In cases like this, where you're trying to decide which API levels to use, the following chart may be helpful:  http://developer.android.com/resources/dashboard/platform-versions.html

It shows the distribution of Android devices by API level. In this particular case of NDK  audio, I calculate that ~66% of devices are at API level 9 or higher at of 2012/03/05. For the other devices, I recommend http://developer.android.com/reference/android/media/AudioTrack.html (and AudioRecord)

AudioTrack and AudioRecord are also the recommended APIs for applications that aren't NDK-centric.


On Sunday, April 1, 2012 5:15:05 AM UTC-7, James Woodbridge wrote:
Ok i got round to writing the Cross platform sound component to our Engine today. In doing so i learned that "OpenSL ES" is only a specification requirement as of Android API Level 9 to device manufacuters so some devices wont ever support it........

Which is the approach to sound in the NDK. So if your device level API isn't 9 or above then your sound wont work. I am left to wonder if as OpenSL ES is a hardware specification that a lot of devices wont support sound using the NDK. I am going to stick with the idea that manufactures will support this and switch out sound on some devices. ALternatively make sure your device is up to date as manufacturers might provide as software soloution to this.

All smells a bit like J2ME to me tbh.

On Tue, Mar 27, 2012 at 3:47 PM, James Woodbridge <james.wo...@gmail.com> wrote:
IT means that the device doesn't have the chip onboard so it isn't implemented. You need to find how the device natively handles audio.

James Woodbridge

unread,
Apr 2, 2012, 1:14:46 PM4/2/12
to andro...@googlegroups.com
Thanks Glenn,
That's really useful, the actual specification of OpenSL ES also seems to be under discussion still too which is relatively annoying for low level work, support for more to come i guess.

To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/uLDmyaXqeSEJ.

To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages