Lines Matching refs:pContext
119 int Equalizer_init(EqualizerContext *pContext);
120 int Equalizer_setConfig(EqualizerContext *pContext, effect_config_t *pConfig);
146 EqualizerContext *pContext = new EqualizerContext; in EffectCreate() local
148 pContext->itfe = &gEqualizerInterface; in EffectCreate()
149 pContext->pEqualizer = NULL; in EffectCreate()
150 pContext->state = EQUALIZER_STATE_UNINITIALIZED; in EffectCreate()
152 ret = Equalizer_init(pContext); in EffectCreate()
155 delete pContext; in EffectCreate()
159 *pHandle = (effect_handle_t)pContext; in EffectCreate()
160 pContext->state = EQUALIZER_STATE_INITIALIZED; in EffectCreate()
163 pContext, AudioEqualizer::GetInstanceSize(kNumBands)+sizeof(EqualizerContext)); in EffectCreate()
170 EqualizerContext * pContext = (EqualizerContext *)handle; in EffectRelease() local
173 if (pContext == NULL) { in EffectRelease()
177 pContext->state = EQUALIZER_STATE_UNINITIALIZED; in EffectRelease()
178 pContext->pEqualizer->free(); in EffectRelease()
179 delete pContext; in EffectRelease()
226 int Equalizer_setConfig(EqualizerContext *pContext, effect_config_t *pConfig) in Equalizer_setConfig() argument
230 CHECK_ARG(pContext != NULL); in Equalizer_setConfig()
250 pContext->config = *pConfig; in Equalizer_setConfig()
252 pContext->pEqualizer->configure(channelCount, in Equalizer_setConfig()
255 pContext->adapter.configure(*pContext->pEqualizer, channelCount, in Equalizer_setConfig()
276 void Equalizer_getConfig(EqualizerContext *pContext, effect_config_t *pConfig) in Equalizer_getConfig() argument
278 *pConfig = pContext->config; in Equalizer_getConfig()
295 int Equalizer_init(EqualizerContext *pContext) in Equalizer_init() argument
301 CHECK_ARG(pContext != NULL); in Equalizer_init()
303 if (pContext->pEqualizer != NULL) { in Equalizer_init()
304 pContext->pEqualizer->free(); in Equalizer_init()
307 pContext->config.inputCfg.accessMode = EFFECT_BUFFER_ACCESS_READ; in Equalizer_init()
308 pContext->config.inputCfg.channels = AUDIO_CHANNEL_OUT_STEREO; in Equalizer_init()
309 pContext->config.inputCfg.format = AUDIO_FORMAT_PCM_16_BIT; in Equalizer_init()
310 pContext->config.inputCfg.samplingRate = 44100; in Equalizer_init()
311 pContext->config.inputCfg.bufferProvider.getBuffer = NULL; in Equalizer_init()
312 pContext->config.inputCfg.bufferProvider.releaseBuffer = NULL; in Equalizer_init()
313 pContext->config.inputCfg.bufferProvider.cookie = NULL; in Equalizer_init()
314 pContext->config.inputCfg.mask = EFFECT_CONFIG_ALL; in Equalizer_init()
315 pContext->config.outputCfg.accessMode = EFFECT_BUFFER_ACCESS_ACCUMULATE; in Equalizer_init()
316 pContext->config.outputCfg.channels = AUDIO_CHANNEL_OUT_STEREO; in Equalizer_init()
317 pContext->config.outputCfg.format = AUDIO_FORMAT_PCM_16_BIT; in Equalizer_init()
318 pContext->config.outputCfg.samplingRate = 44100; in Equalizer_init()
319 pContext->config.outputCfg.bufferProvider.getBuffer = NULL; in Equalizer_init()
320 pContext->config.outputCfg.bufferProvider.releaseBuffer = NULL; in Equalizer_init()
321 pContext->config.outputCfg.bufferProvider.cookie = NULL; in Equalizer_init()
322 pContext->config.outputCfg.mask = EFFECT_CONFIG_ALL; in Equalizer_init()
324 pContext->pEqualizer = AudioEqualizer::CreateInstance( in Equalizer_init()
333 pContext->pEqualizer->setFrequency(i, gFreqs[i]); in Equalizer_init()
334 pContext->pEqualizer->setBandwidth(i, gBandwidths[i]); in Equalizer_init()
337 pContext->pEqualizer->enable(true); in Equalizer_init()
339 Equalizer_setConfig(pContext, &pContext->config); in Equalizer_init()
606 android::EqualizerContext * pContext = (android::EqualizerContext *) self; in Equalizer_process() local
608 if (pContext == NULL) { in Equalizer_process()
617 if (pContext->state == EQUALIZER_STATE_UNINITIALIZED) { in Equalizer_process()
620 if (pContext->state == EQUALIZER_STATE_INITIALIZED) { in Equalizer_process()
624 pContext->adapter.process(inBuffer->raw, outBuffer->raw, outBuffer->frameCount); in Equalizer_process()
632 android::EqualizerContext * pContext = (android::EqualizerContext *) self; in Equalizer_command() local
635 if (pContext == NULL || pContext->state == EQUALIZER_STATE_UNINITIALIZED) { in Equalizer_command()
639 android::AudioEqualizer * pEqualizer = pContext->pEqualizer; in Equalizer_command()
648 *(int *) pReplyData = Equalizer_init(pContext); in Equalizer_command()
655 *(int *) pReplyData = Equalizer_setConfig(pContext, in Equalizer_command()
662 Equalizer_getConfig(pContext, (effect_config_t *) pCmdData); in Equalizer_command()
665 Equalizer_setConfig(pContext, &pContext->config); in Equalizer_command()
700 if (pContext->state != EQUALIZER_STATE_INITIALIZED) { in Equalizer_command()
703 pContext->state = EQUALIZER_STATE_ACTIVE; in Equalizer_command()
711 if (pContext->state != EQUALIZER_STATE_ACTIVE) { in Equalizer_command()
714 pContext->state = EQUALIZER_STATE_INITIALIZED; in Equalizer_command()
733 android::EqualizerContext * pContext = (android::EqualizerContext *) self; in Equalizer_getDescriptor() local
735 if (pContext == NULL || pDescriptor == NULL) { in Equalizer_getDescriptor()