Lines Matching defs:effect

89     preproc_session_t *session;     // session the effect is on
90 const preproc_ops_t *ops; // effect ops table
108 uint32_t samplingRate; // sampling rate at effect process interface
175 // UUIDs for effect types have been generated from http://www.itu.int/ITU-T/asn1/uuid.html
268 int AgcInit (preproc_effect_t *effect)
271 webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine);
279 int AgcCreate(preproc_effect_t *effect)
281 webrtc::GainControl *agc = effect->session->apm->gain_control();
287 effect->engine = static_cast<preproc_fx_handle_t>(agc);
288 AgcInit(effect);
292 int AgcGetParameter(preproc_effect_t *effect,
300 webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine);
356 int AgcSetParameter (preproc_effect_t *effect, void *pParam, void *pValue)
361 webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine);
398 void AgcEnable(preproc_effect_t *effect)
400 webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine);
405 void AgcDisable(preproc_effect_t *effect)
408 webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine);
433 int AecInit (preproc_effect_t *effect)
436 webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine);
442 int AecCreate(preproc_effect_t *effect)
444 webrtc::EchoControlMobile *aec = effect->session->apm->echo_control_mobile();
450 effect->engine = static_cast<preproc_fx_handle_t>(aec);
451 AecInit (effect);
455 int AecGetParameter(preproc_effect_t *effect,
469 *(uint32_t *)pValue = 1000 * effect->session->apm->stream_delay_ms();
480 int AecSetParameter (preproc_effect_t *effect, void *pParam, void *pValue)
489 status = effect->session->apm->set_stream_delay_ms(value/1000);
500 void AecEnable(preproc_effect_t *effect)
502 webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine);
507 void AecDisable(preproc_effect_t *effect)
510 webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine);
514 int AecSetDevice(preproc_effect_t *effect, uint32_t device)
517 webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine);
557 int NsInit (preproc_effect_t *effect)
560 webrtc::NoiseSuppression *ns = static_cast<webrtc::NoiseSuppression *>(effect->engine);
565 int NsCreate(preproc_effect_t *effect)
567 webrtc::NoiseSuppression *ns = effect->session->apm->noise_suppression();
573 effect->engine = static_cast<preproc_fx_handle_t>(ns);
574 NsInit (effect);
578 int NsGetParameter(preproc_effect_t *effect,
587 int NsSetParameter (preproc_effect_t *effect, void *pParam, void *pValue)
593 void NsEnable(preproc_effect_t *effect)
595 webrtc::NoiseSuppression *ns = static_cast<webrtc::NoiseSuppression *>(effect->engine);
600 void NsDisable(preproc_effect_t *effect)
603 webrtc::NoiseSuppression *ns = static_cast<webrtc::NoiseSuppression *>(effect->engine);
638 int Effect_SetState(preproc_effect_t *effect, uint32_t state)
641 ALOGV("Effect_SetState proc %d, new %d old %d", effect->procId, state, effect->state);
644 switch(effect->state) {
646 effect->ops->disable(effect);
647 Session_SetProcEnabled(effect->session, effect->procId, false);
653 BAD_STATE_ABORT(effect->state, state);
657 switch(effect->state) {
659 status = effect->ops->create(effect);
668 BAD_STATE_ABORT(effect->state, state);
672 switch(effect->state) {
678 effect->ops->disable(effect);
679 Session_SetProcEnabled(effect->session, effect->procId, false);
685 BAD_STATE_ABORT(effect->state, state);
689 switch(effect->state) {
696 // enabling an already enabled effect is just ignored
699 effect->ops->enable(effect);
700 Session_SetProcEnabled(effect->session, effect->procId, true);
703 BAD_STATE_ABORT(effect->state, state);
707 BAD_STATE_ABORT(effect->state, state);
710 effect->state = state;
715 int Effect_Init(preproc_effect_t *effect, uint32_t procId)
718 effect->itfe = &sEffectInterfaceReverse;
720 effect->itfe = &sEffectInterface;
722 effect->ops = sPreProcOps[procId];
723 effect->procId = procId;
724 effect->state = PREPROC_EFFECT_STATE_INIT;
728 int Effect_Create(preproc_effect_t *effect,
732 effect->session = session;
733 *interface = (effect_handle_t)&effect->itfe;
734 return Effect_SetState(effect, PREPROC_EFFECT_STATE_CREATED);
737 int Effect_Release(preproc_effect_t *effect)
739 return Effect_SetState(effect, PREPROC_EFFECT_STATE_INIT);
1165 preproc_effect_t * effect = (preproc_effect_t *)self;
1168 if (effect == NULL){
1169 ALOGV("PreProcessingFx_Process() ERROR effect == NULL");
1172 preproc_session_t * session = (preproc_session_t *)effect->session;
1180 session->processedMsk |= (1<<effect->procId);
1186 effect->session->processedMsk = 0;
1284 effect->session->apm->ProcessStream(session->procFrame);
1342 preproc_effect_t * effect = (preproc_effect_t *) self;
1346 if (effect == NULL){
1357 if (effect->ops->init) {
1358 effect->ops->init(effect);
1375 uint32_t enabledMsk = effect->session->enabledMsk;
1377 effect->session->enabledMsk = 0;
1380 *(int *)pReplyData = Session_SetConfig(effect->session, (effect_config_t *)pCmdData);
1383 effect->session->enabledMsk = enabledMsk;
1389 if (effect->state != PREPROC_EFFECT_STATE_ACTIVE) {
1390 *(int *)pReplyData = Effect_SetState(effect, PREPROC_EFFECT_STATE_CONFIG);
1402 Session_GetConfig(effect->session, (effect_config_t *)pReplyData);
1414 *(int *)pReplyData = Session_SetReverseConfig(effect->session,
1428 Session_GetReverseConfig(effect->session, (effect_config_t *)pCmdData);
1432 if (effect->ops->reset) {
1433 effect->ops->reset(effect);
1454 if (effect->ops->get_parameter) {
1455 p->status = effect->ops->get_parameter(effect, p->data,
1478 if (effect->ops->set_parameter) {
1479 *(int *)pReplyData = effect->ops->set_parameter(effect,
1490 *(int *)pReplyData = Effect_SetState(effect, PREPROC_EFFECT_STATE_ACTIVE);
1498 *(int *)pReplyData = Effect_SetState(effect, PREPROC_EFFECT_STATE_CONFIG);
1509 if (effect->ops->set_device) {
1510 effect->ops->set_device(effect, *(uint32_t *)pCmdData);
1530 effect->aux_channels_on = sHasAuxChannels[effect->procId];
1532 effect->aux_channels_on = false;
1534 effect->cur_channel_config = (effect->session->inChannelCount == 1) ?
1594 !effect->aux_channels_on) {
1596 " fx %d", effect->procId);
1635 if (*(uint32_t *)pCmdData != EFFECT_FEATURE_AUX_CHANNELS || !effect->aux_channels_on) {
1644 &sDualMicConfigs[effect->cur_channel_config],
1649 "gDualMicEnabled %d effect->aux_channels_on %d",
1650 gDualMicEnabled, effect->aux_channels_on);
1664 if (*(uint32_t *)pCmdData != EFFECT_FEATURE_AUX_CHANNELS || !effect->aux_channels_on) {
1668 "CmdData %d effect->aux_channels_on %d",
1669 *(uint32_t *)pCmdData, effect->aux_channels_on);
1684 effect->cur_channel_config = i;
1701 preproc_effect_t * effect = (preproc_effect_t *) self;
1703 if (effect == NULL || pDescriptor == NULL) {
1707 *pDescriptor = *sDescriptors[effect->procId];
1716 preproc_effect_t * effect = (preproc_effect_t *)self;
1719 if (effect == NULL){
1720 ALOGW("PreProcessingFx_ProcessReverse() ERROR effect == NULL");
1723 preproc_session_t * session = (preproc_session_t *)effect->session;
1730 session->revProcessedMsk |= (1<<effect->procId);
1737 effect->session->revProcessedMsk = 0;
1794 effect->session->apm->AnalyzeReverseStream(session->revFrame);
1802 // effect_handle_t interface implementation for effect