Lines Matching defs:pContext
58 EffectContext* pContext;
64 pContext = new EffectContext;
65 pContext->sessionId = sessionId;
66 pContext->ioId = ioId;
67 pContext->uuid = *uuid;
68 pContext->common_itfe = &gEffectInterface;
72 pContext->eHandle[SUB_FX_HOST] = pContext->eHandle[SUB_FX_OFFLOAD] = NULL;
78 pContext->sube = new sub_effect_entry_t*[SUB_FX_COUNT];
79 pContext->desc = new effect_descriptor_t[SUB_FX_COUNT];
80 pContext->aeli = new audio_effect_library_t*[SUB_FX_COUNT];
88 delete[] pContext->sube;
89 delete[] pContext->desc;
90 delete[] pContext->aeli;
91 delete pContext;
104 pContext->sube[SUB_FX_OFFLOAD] = sube[0];
105 pContext->desc[SUB_FX_OFFLOAD] = desc[0];
106 pContext->aeli[SUB_FX_OFFLOAD] = aeli[0];
107 pContext->sube[SUB_FX_HOST] = sube[1];
108 pContext->desc[SUB_FX_HOST] = desc[1];
109 pContext->aeli[SUB_FX_HOST] = aeli[1];
113 pContext->sube[SUB_FX_HOST] = sube[0];
114 pContext->desc[SUB_FX_HOST] = desc[0];
115 pContext->aeli[SUB_FX_HOST] = aeli[0];
116 pContext->sube[SUB_FX_OFFLOAD] = sube[1];
117 pContext->desc[SUB_FX_OFFLOAD] = desc[1];
118 pContext->aeli[SUB_FX_OFFLOAD] = aeli[1];
124 effect_uuid_t uuid_print = pContext->desc[SUB_FX_HOST].uuid;
137 pContext->replySize = PROXY_REPLY_SIZE_DEFAULT;
138 pContext->replyData = (char *)malloc(PROXY_REPLY_SIZE_DEFAULT);
140 *pHandle = (effect_handle_t)pContext;
146 EffectContext * pContext = (EffectContext *)handle;
147 if (pContext == NULL) {
152 delete[] pContext->desc;
153 free(pContext->replyData);
155 if (pContext->eHandle[SUB_FX_HOST])
156 pContext->aeli[SUB_FX_HOST]->release_effect(pContext->eHandle[SUB_FX_HOST]);
157 if (pContext->eHandle[SUB_FX_OFFLOAD])
158 pContext->aeli[SUB_FX_OFFLOAD]->release_effect(pContext->eHandle[SUB_FX_OFFLOAD]);
159 delete[] pContext->aeli;
160 delete[] pContext->sube;
161 delete pContext;
162 pContext = NULL;
184 EffectContext *pContext = (EffectContext *) self;
186 if (pContext != NULL) {
187 int index = pContext->index;
190 ret = (*pContext->eHandle[index])->process(pContext->eHandle[index],
205 EffectContext *pContext = (EffectContext *) self;
207 if (pContext == NULL) {
211 if (pContext->eHandle[SUB_FX_HOST] == NULL) {
213 status = pContext->aeli[SUB_FX_HOST]->create_effect(
214 &pContext->desc[SUB_FX_HOST].uuid,
215 pContext->sessionId, pContext->ioId,
216 &(pContext->eHandle[SUB_FX_HOST]));
217 if (status != NO_ERROR || (pContext->eHandle[SUB_FX_HOST] == NULL)) {
222 if (pContext->eHandle[SUB_FX_OFFLOAD] == NULL) {
224 status = pContext->aeli[SUB_FX_OFFLOAD]->create_effect(
225 &pContext->desc[SUB_FX_OFFLOAD].uuid,
226 pContext->sessionId, pContext->ioId,
227 &(pContext->eHandle[SUB_FX_OFFLOAD]));
228 if (status != NO_ERROR || (pContext->eHandle[SUB_FX_OFFLOAD] == NULL)) {
230 pContext->eHandle[SUB_FX_OFFLOAD] = NULL;
234 pContext->index = SUB_FX_HOST;
254 pContext->index = offloadParam->isOffload ? SUB_FX_OFFLOAD : SUB_FX_HOST;
257 if (pContext->eHandle[pContext->index] == NULL) {
262 pContext->ioId = offloadParam->ioHandle;
263 ALOGV("Effect_command()CMD_OFFLOAD index:%d io %d", pContext->index, pContext->ioId);
267 if (pContext->eHandle[SUB_FX_OFFLOAD]) {
269 return (*pContext->eHandle[SUB_FX_OFFLOAD])->command(
270 pContext->eHandle[SUB_FX_OFFLOAD], cmdCode, cmdSize,
280 int index = pContext->index;
295 tmpSize = pContext->replySize;
299 if (tmpSize > pContext->replySize) {
301 pContext->replyData = (char *)realloc(pContext->replyData, tmpSize);
302 pContext->replySize = tmpSize;
315 // other sub effect is lost in pContext->replyData
317 if (pContext->eHandle[i] == NULL) {
327 subReplyData[i] = pReplyData == NULL ? NULL : pContext->replyData;
329 *subStatus[i] = (*pContext->eHandle[i])->command(
330 pContext->eHandle[i], cmdCode, cmdSize,
342 EffectContext * pContext = (EffectContext *) self;
346 if (pContext == NULL || pDescriptor == NULL) {
350 if (pContext->desc == NULL) {
354 desc = &pContext->desc[SUB_FX_HOST];
356 pDescriptor->uuid = pContext->uuid; // Replace the uuid with the Proxy UUID
358 if (pContext->eHandle[SUB_FX_OFFLOAD] != NULL)