Lines Matching defs:pContext
61 EffectContext* pContext;
67 pContext = new EffectContext;
68 pContext->sessionId = sessionId;
69 pContext->ioId = ioId;
70 pContext->uuid = *uuid;
71 pContext->common_itfe = &gEffectInterface;
75 pContext->eHandle[SUB_FX_HOST] = pContext->eHandle[SUB_FX_OFFLOAD] = NULL;
81 pContext->sube = new sub_effect_entry_t*[SUB_FX_COUNT];
82 pContext->desc = new effect_descriptor_t[SUB_FX_COUNT];
83 pContext->aeli = new audio_effect_library_t*[SUB_FX_COUNT];
91 delete[] pContext->sube;
92 delete[] pContext->desc;
93 delete[] pContext->aeli;
106 pContext->sube[SUB_FX_OFFLOAD] = sube[0];
107 pContext->desc[SUB_FX_OFFLOAD] = desc[0];
108 pContext->aeli[SUB_FX_OFFLOAD] = aeli[0];
109 pContext->sube[SUB_FX_HOST] = sube[1];
110 pContext->desc[SUB_FX_HOST] = desc[1];
111 pContext->aeli[SUB_FX_HOST] = aeli[1];
115 pContext->sube[SUB_FX_HOST] = sube[0];
116 pContext->desc[SUB_FX_HOST] = desc[0];
117 pContext->aeli[SUB_FX_HOST] = aeli[0];
118 pContext->sube[SUB_FX_OFFLOAD] = sube[1];
119 pContext->desc[SUB_FX_OFFLOAD] = desc[1];
120 pContext->aeli[SUB_FX_OFFLOAD] = aeli[1];
126 effect_uuid_t uuid_print = pContext->desc[SUB_FX_HOST].uuid;
139 pContext->replySize = PROXY_REPLY_SIZE_DEFAULT;
140 pContext->replyData = (char *)malloc(PROXY_REPLY_SIZE_DEFAULT);
142 *pHandle = (effect_handle_t)pContext;
148 EffectContext * pContext = (EffectContext *)handle;
149 if (pContext == NULL) {
154 delete[] pContext->desc;
155 free(pContext->replyData);
157 if (pContext->eHandle[SUB_FX_HOST])
158 pContext->aeli[SUB_FX_HOST]->release_effect(pContext->eHandle[SUB_FX_HOST]);
159 if (pContext->eHandle[SUB_FX_OFFLOAD])
160 pContext->aeli[SUB_FX_OFFLOAD]->release_effect(pContext->eHandle[SUB_FX_OFFLOAD]);
161 delete[] pContext->aeli;
162 delete[] pContext->sube;
163 delete pContext;
164 pContext = NULL;
186 EffectContext *pContext = (EffectContext *) self;
188 if (pContext != NULL) {
189 int index = pContext->index;
192 ret = (*pContext->eHandle[index])->process(pContext->eHandle[index],
207 EffectContext *pContext = (EffectContext *) self;
209 if (pContext == NULL) {
213 if (pContext->eHandle[SUB_FX_HOST] == NULL) {
215 status = pContext->aeli[SUB_FX_HOST]->create_effect(
216 &pContext->desc[SUB_FX_HOST].uuid,
217 pContext->sessionId, pContext->ioId,
218 &(pContext->eHandle[SUB_FX_HOST]));
219 if (status != NO_ERROR || (pContext->eHandle[SUB_FX_HOST] == NULL)) {
224 if (pContext->eHandle[SUB_FX_OFFLOAD] == NULL) {
226 status = pContext->aeli[SUB_FX_OFFLOAD]->create_effect(
227 &pContext->desc[SUB_FX_OFFLOAD].uuid,
228 pContext->sessionId, pContext->ioId,
229 &(pContext->eHandle[SUB_FX_OFFLOAD]));
230 if (status != NO_ERROR || (pContext->eHandle[SUB_FX_OFFLOAD] == NULL)) {
232 pContext->eHandle[SUB_FX_OFFLOAD] = NULL;
236 pContext->index = SUB_FX_HOST;
251 pContext->index = offloadParam->isOffload ? SUB_FX_OFFLOAD : SUB_FX_HOST;
254 if (pContext->eHandle[pContext->index] == NULL) {
259 pContext->ioId = offloadParam->ioHandle;
260 ALOGV("Effect_command()CMD_OFFLOAD index:%d io %d", pContext->index, pContext->ioId);
264 if (pContext->eHandle[SUB_FX_OFFLOAD]) {
266 return (*pContext->eHandle[SUB_FX_OFFLOAD])->command(
267 pContext->eHandle[SUB_FX_OFFLOAD], cmdCode, cmdSize,
277 int index = pContext->index;
292 tmpSize = pContext->replySize;
296 if (tmpSize > pContext->replySize) {
298 pContext->replyData = (char *)realloc(pContext->replyData, tmpSize);
299 pContext->replySize = tmpSize;
312 // other sub effect is lost in pContext->replyData
314 if (pContext->eHandle[i] == NULL) {
324 subReplyData[i] = pReplyData == NULL ? NULL : pContext->replyData;
326 *subStatus[i] = (*pContext->eHandle[i])->command(
327 pContext->eHandle[i], cmdCode, cmdSize,
339 EffectContext * pContext = (EffectContext *) self;
343 if (pContext == NULL || pDescriptor == NULL) {
347 if (pContext->desc == NULL) {
351 desc = &pContext->desc[SUB_FX_HOST];
353 pDescriptor->uuid = pContext->uuid; // Replace the uuid with the Proxy UUID
355 if (pContext->eHandle[SUB_FX_OFFLOAD] != NULL)