I am having a problem with the volume interface in OpenSL on Android. When I attempt to create an Output Mix object with the volume interface like this:
const SLInterfaceID interfaceIDs[1]={SL_IID_VOLUME};
const SLboolean interfaceRequirements[1]={SL_BOOLEAN_TRUE};
SLresult result=(*engineInterface)->CreateOutputMix(engineInterface,&outputObject,1,interfaceIDs,interfaceRequirements);
result
comes back as SL_RESULT_FEATURE_UNSUPPORTED
even though the volume interface is listed as mandated in the spec.
If I change the 1
to 0
so that it ignores the requested interfaces, the output mix object is created, but obviously fails when attempt to GetInterface(outputObject,SL_IID_VOLUME,&volumeInterface)
.
The only mention of the volume interface I see here is related to volume calculations when using EnableStereoPosition
.