bool OpenSLESPlayer::Initialize () { SLresult result; SLuint32 numSupportedInterfaces; LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("OpenSLESPlayer::Initialize ()"); slQueryNumSupportedEngineInterfaces (&numSupportedInterfaces); LOG_OSL (" %d supported engine interfaces:", numSupportedInterfaces); for (SLuint32 i = 0; i < numSupportedInterfaces; i ++) { SLInterfaceID interfaceId; slQuerySupportedEngineInterfaces (i, &interfaceId); LOG_OSL (" interface = %s: ", interfaceIdToString (interfaceId)); } LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); LOG_OSL ("********************************"); #if 0 const SLInterfaceID ids[1] = {SL_IID_ENGINECAPABILITIES}; const SLboolean req[1] = {SL_BOOLEAN_TRUE}; result = slCreateEngine(&engineObject, 0, NULL, 1, ids, req); #else result = slCreateEngine(&engineObject, 0, NULL, 0, NULL, NULL); #endif CHECK_RESULT_BOOL ("slCreateEngine"); result = (*engineObject)->Realize (engineObject, SL_BOOLEAN_FALSE); CHECK_RESULT_BOOL ("engine->Realize"); result = (*engineObject)->GetInterface (engineObject, SL_IID_ENGINE, &engineEngine); CHECK_RESULT_BOOL ("engine->GetInterface (SL_IID_ENGINE)"); #if 0 { SLEngineCapabilitiesItf capabilities; SLuint16 profilesSupported; result = (*engineObject)->GetInterface (engineObject, SL_IID_ENGINECAPABILITIES, &capabilities); CHECK_RESULT_BOOL ("engineObject->GetInterface (SL_IID_ENGINECAPABILITIES)"); result = (*capabilities)->QuerySupportedProfiles (capabilities, &profilesSupported); CHECK_RESULT_BOOL ("capabilities->QuerySupportedProfiles"); g_debug ("supported profiles:"); if (profilesSupported & SL_PROFILES_PHONE) g_debug (" PHONE"); if (profilesSupported & SL_PROFILES_MUSIC) g_debug (" MUSIC"); if (profilesSupported & SL_PROFILES_GAME) g_debug (" GAME"); } #endif result = (*engineEngine)->CreateOutputMix (engineEngine, &outputMixObject, 0, NULL, NULL); CHECK_RESULT_BOOL ("engine->CreateOutputMix"); result = (*outputMixObject)->Realize(outputMixObject, SL_BOOLEAN_FALSE); CHECK_RESULT_BOOL ("outputMixObject->Realize"); return true; }
void dumpAvailableEngineInterfaces() { SLresult result; DEBUG("Engine Interfaces\n"); SLuint32 numSupportedInterfaces; result = slQueryNumSupportedEngineInterfaces(&numSupportedInterfaces); assert(SL_RESULT_SUCCESS == result); result = slQueryNumSupportedEngineInterfaces(NULL); assert(SL_RESULT_PARAMETER_INVALID == result); DEBUG("Engine number of supported interfaces %lu\n", numSupportedInterfaces); for(SLuint32 i=0; i< numSupportedInterfaces; i++){ SLInterfaceID pInterfaceId; slQuerySupportedEngineInterfaces(i, &pInterfaceId); const char* nm = "unknown iid"; if (pInterfaceId==SL_IID_NULL) nm="null"; else if (pInterfaceId==SL_IID_OBJECT) nm="object"; else if (pInterfaceId==SL_IID_AUDIOIODEVICECAPABILITIES) nm="audiodevicecapabilities"; else if (pInterfaceId==SL_IID_LED) nm="led"; else if (pInterfaceId==SL_IID_VIBRA) nm="vibra"; else if (pInterfaceId==SL_IID_METADATAEXTRACTION) nm="metadataextraction"; else if (pInterfaceId==SL_IID_METADATATRAVERSAL) nm="metadatatraversal"; else if (pInterfaceId==SL_IID_DYNAMICSOURCE) nm="dynamicsource"; else if (pInterfaceId==SL_IID_OUTPUTMIX) nm="outputmix"; else if (pInterfaceId==SL_IID_PLAY) nm="play"; else if (pInterfaceId==SL_IID_PREFETCHSTATUS) nm="prefetchstatus"; else if (pInterfaceId==SL_IID_PLAYBACKRATE) nm="playbackrate"; else if (pInterfaceId==SL_IID_SEEK) nm="seek"; else if (pInterfaceId==SL_IID_RECORD) nm="record"; else if (pInterfaceId==SL_IID_EQUALIZER) nm="equalizer"; else if (pInterfaceId==SL_IID_VOLUME) nm="volume"; else if (pInterfaceId==SL_IID_DEVICEVOLUME) nm="devicevolume"; else if (pInterfaceId==SL_IID_BUFFERQUEUE) nm="bufferqueue"; else if (pInterfaceId==SL_IID_PRESETREVERB) nm="presetreverb"; else if (pInterfaceId==SL_IID_ENVIRONMENTALREVERB) nm="environmentalreverb"; else if (pInterfaceId==SL_IID_EFFECTSEND) nm="effectsend"; else if (pInterfaceId==SL_IID_3DGROUPING) nm="3dgrouping"; else if (pInterfaceId==SL_IID_3DCOMMIT) nm="3dcommit"; else if (pInterfaceId==SL_IID_3DLOCATION) nm="3dlocation"; else if (pInterfaceId==SL_IID_3DDOPPLER) nm="3ddoppler"; else if (pInterfaceId==SL_IID_3DSOURCE) nm="3dsource"; else if (pInterfaceId==SL_IID_3DMACROSCOPIC) nm="3dmacroscopic"; else if (pInterfaceId==SL_IID_MUTESOLO) nm="mutesolo"; else if (pInterfaceId==SL_IID_DYNAMICINTERFACEMANAGEMENT) nm="dynamicinterfacemanagement"; else if (pInterfaceId==SL_IID_MIDIMESSAGE) nm="midimessage"; else if (pInterfaceId==SL_IID_MIDIMUTESOLO) nm="midimutesolo"; else if (pInterfaceId==SL_IID_MIDITEMPO) nm="miditempo"; else if (pInterfaceId==SL_IID_MIDITIME) nm="miditime"; else if (pInterfaceId==SL_IID_AUDIODECODERCAPABILITIES) nm="audiodecodercapabilities"; else if (pInterfaceId==SL_IID_AUDIOENCODERCAPABILITIES) nm="audioencodercapabilities"; else if (pInterfaceId==SL_IID_AUDIOENCODER) nm="audioencoder"; else if (pInterfaceId==SL_IID_BASSBOOST) nm="bassboost"; else if (pInterfaceId==SL_IID_PITCH) nm="pitch"; else if (pInterfaceId==SL_IID_RATEPITCH) nm="ratepitch"; else if (pInterfaceId==SL_IID_VIRTUALIZER) nm="virtualizer"; else if (pInterfaceId==SL_IID_VISUALIZATION) nm="visualization"; else if (pInterfaceId==SL_IID_ENGINE) nm="engine"; else if (pInterfaceId==SL_IID_ENGINECAPABILITIES) nm="enginecapabilities"; else if (pInterfaceId==SL_IID_THREADSYNC) nm="theadsync"; else if (pInterfaceId==SL_IID_ANDROIDEFFECT) nm="androideffect"; else if (pInterfaceId==SL_IID_ANDROIDEFFECTSEND) nm="androideffectsend"; else if (pInterfaceId==SL_IID_ANDROIDEFFECTCAPABILITIES) nm="androideffectcapabilities"; else if (pInterfaceId==SL_IID_ANDROIDCONFIGURATION) nm="androidconfiguration"; else if (pInterfaceId==SL_IID_ANDROIDSIMPLEBUFFERQUEUE) nm="simplebuferqueue"; //else if (pInterfaceId==//SL_IID_ANDROIDBUFFERQUEUESOURCE) nm="bufferqueuesource"; DEBUG("%s,",nm); } }