Lines Matching refs:pContext

116 int Equalizer_init(EqualizerContext *pContext);
117 int Equalizer_setConfig(EqualizerContext *pContext, effect_config_t *pConfig);
160 EqualizerContext *pContext = new EqualizerContext;
162 pContext->itfe = &gEqualizerInterface;
163 pContext->pEqualizer = NULL;
164 pContext->state = EQUALIZER_STATE_UNINITIALIZED;
166 ret = Equalizer_init(pContext);
169 delete pContext;
173 *pHandle = (effect_handle_t)pContext;
174 pContext->state = EQUALIZER_STATE_INITIALIZED;
177 pContext, AudioEqualizer::GetInstanceSize(kNumBands)+sizeof(EqualizerContext));
184 EqualizerContext * pContext = (EqualizerContext *)handle;
187 if (pContext == NULL) {
191 pContext->state = EQUALIZER_STATE_UNINITIALIZED;
192 pContext->pEqualizer->free();
193 delete pContext;
232 // pContext: effect engine context
240 int Equalizer_setConfig(EqualizerContext *pContext, effect_config_t *pConfig)
244 CHECK_ARG(pContext != NULL);
265 pContext->config = *pConfig;
267 pContext->pEqualizer->configure(channelCount,
270 pContext->adapter.configure(*pContext->pEqualizer, channelCount,
283 // pContext: effect engine context
291 void Equalizer_getConfig(EqualizerContext *pContext, effect_config_t *pConfig)
293 *pConfig = pContext->config;
304 // pContext: effect engine context
310 int Equalizer_init(EqualizerContext *pContext)
316 CHECK_ARG(pContext != NULL);
318 if (pContext->pEqualizer != NULL) {
319 pContext->pEqualizer->free();
322 pContext->config.inputCfg.accessMode = EFFECT_BUFFER_ACCESS_READ;
323 pContext->config.inputCfg.channels = AUDIO_CHANNEL_OUT_STEREO;
324 pContext->config.inputCfg.format = AUDIO_FORMAT_PCM_16_BIT;
325 pContext->config.inputCfg.samplingRate = 44100;
326 pContext->config.inputCfg.bufferProvider.getBuffer = NULL;
327 pContext->config.inputCfg.bufferProvider.releaseBuffer = NULL;
328 pContext->config.inputCfg.bufferProvider.cookie = NULL;
329 pContext->config.inputCfg.mask = EFFECT_CONFIG_ALL;
330 pContext->config.outputCfg.accessMode = EFFECT_BUFFER_ACCESS_ACCUMULATE;
331 pContext->config.outputCfg.channels = AUDIO_CHANNEL_OUT_STEREO;
332 pContext->config.outputCfg.format = AUDIO_FORMAT_PCM_16_BIT;
333 pContext->config.outputCfg.samplingRate = 44100;
334 pContext->config.outputCfg.bufferProvider.getBuffer = NULL;
335 pContext->config.outputCfg.bufferProvider.releaseBuffer = NULL;
336 pContext->config.outputCfg.bufferProvider.cookie = NULL;
337 pContext->config.outputCfg.mask = EFFECT_CONFIG_ALL;
339 pContext->pEqualizer = AudioEqualizer::CreateInstance(
348 pContext->pEqualizer->setFrequency(i, gFreqs[i]);
349 pContext->pEqualizer->setBandwidth(i, gBandwidths[i]);
352 pContext->pEqualizer->enable(true);
354 Equalizer_setConfig(pContext, &pContext->config);
621 android::EqualizerContext * pContext = (android::EqualizerContext *) self;
623 if (pContext == NULL) {
632 if (pContext->state == EQUALIZER_STATE_UNINITIALIZED) {
635 if (pContext->state == EQUALIZER_STATE_INITIALIZED) {
639 pContext->adapter.process(inBuffer->raw, outBuffer->raw, outBuffer->frameCount);
647 android::EqualizerContext * pContext = (android::EqualizerContext *) self;
650 if (pContext == NULL || pContext->state == EQUALIZER_STATE_UNINITIALIZED) {
654 android::AudioEqualizer * pEqualizer = pContext->pEqualizer;
663 *(int *) pReplyData = Equalizer_init(pContext);
670 *(int *) pReplyData = Equalizer_setConfig(pContext,
677 Equalizer_getConfig(pContext, (effect_config_t *) pCmdData);
680 Equalizer_setConfig(pContext, &pContext->config);
715 if (pContext->state != EQUALIZER_STATE_INITIALIZED) {
718 pContext->state = EQUALIZER_STATE_ACTIVE;
726 if (pContext->state != EQUALIZER_STATE_ACTIVE) {
729 pContext->state = EQUALIZER_STATE_INITIALIZED;
748 android::EqualizerContext * pContext = (android::EqualizerContext *) self;
750 if (pContext == NULL || pDescriptor == NULL) {