Lines Matching refs:pInstance
64 LVEQNB_Instance_t *pInstance =(LVEQNB_Instance_t *)hInstance;
74 *pParams = pInstance->Params;
105 LVEQNB_Instance_t *pInstance =(LVEQNB_Instance_t *)hInstance;
112 *pCapabilities = pInstance->Capabilities;
126 /* pInstance Pointer to the instance */
140 void LVEQNB_SetFilters(LVEQNB_Instance_t *pInstance,
151 pInstance->NBands = pParams->NBands;
165 pInstance->pBiquadType[i] = LVEQNB_SinglePrecision; /* Default to single precision */
171 pInstance->pBiquadType[i] = LVEQNB_DoublePrecision;
178 pInstance->pBiquadType[i] = LVEQNB_DoublePrecision;
187 pInstance->pBiquadType[i] = LVEQNB_OutOfRange;
194 pInstance->pBandDefinitions[i] = pParams->pBandDefinition[i];
209 /* pInstance Pointer to the instance */
214 void LVEQNB_SetCoefficients(LVEQNB_Instance_t *pInstance)
224 for (i=0; i<pInstance->Params.NBands; i++)
230 BiquadType = pInstance->pBiquadType[i];
240 LVEQNB_DoublePrecCoefs((LVM_UINT16)pInstance->Params.SampleRate,
241 &pInstance->pBandDefinitions[i],
247 PK_2I_D32F32CllGss_TRC_WRA_01_Init(&pInstance->pEQNB_FilterState[i],
248 &pInstance->pEQNB_Taps[i],
260 LVEQNB_SinglePrecCoefs((LVM_UINT16)pInstance->Params.SampleRate,
261 &pInstance->pBandDefinitions[i],
267 PK_2I_D32F32CssGss_TRC_WRA_01_Init(&pInstance->pEQNB_FilterState[i],
268 &pInstance->pEQNB_Taps[i],
288 /* pInstance Pointer to the instance */
292 void LVEQNB_ClearFilterHistory(LVEQNB_Instance_t *pInstance)
298 pTapAddress = (LVM_INT16 *)pInstance->pEQNB_Taps;
299 NumTaps = (LVM_INT16)((pInstance->Capabilities.MaxBands * sizeof(Biquad_2I_Order2_Taps_t))/sizeof(LVM_INT16));
336 LVEQNB_Instance_t *pInstance = (LVEQNB_Instance_t *)hInstance;
354 OperatingModeSave = pInstance->Params.OperatingMode;
357 if (pParams->SampleRate != pInstance->Params.SampleRate)
359 LVC_Mixer_VarSlope_SetTimeConstant(&pInstance->BypassMixer.MixerStream[0],LVEQNB_BYPASS_MIXER_TC,(LVM_Fs_en)pParams->SampleRate,2);
360 LVC_Mixer_VarSlope_SetTimeConstant(&pInstance->BypassMixer.MixerStream[1],LVEQNB_BYPASS_MIXER_TC,(LVM_Fs_en)pParams->SampleRate,2);
364 if( (pInstance->Params.NBands != pParams->NBands ) ||
365 (pInstance->Params.OperatingMode != pParams->OperatingMode ) ||
366 (pInstance->Params.pBandDefinition != pParams->pBandDefinition ) ||
367 (pInstance->Params.SampleRate != pParams->SampleRate ) ||
368 (pInstance->Params.SourceFormat != pParams->SourceFormat ))
378 if((pInstance->pBandDefinitions[i].Frequency != pParams->pBandDefinition[i].Frequency )||
379 (pInstance->pBandDefinitions[i].Gain != pParams->pBandDefinition[i].Gain )||
380 (pInstance->pBandDefinitions[i].QFactor != pParams->pBandDefinition[i].QFactor ))
394 if (pInstance->Params.SampleRate != pParams->SampleRate)
396 LVEQNB_ClearFilterHistory(pInstance); /* Clear the history */
402 pInstance->Params = *pParams;
412 LVEQNB_SetFilters(pInstance, /* Instance pointer */
418 LVEQNB_SetCoefficients(pInstance); /* Instance pointer */
425 LVC_Mixer_SetTarget(&pInstance->BypassMixer.MixerStream[0],LVM_MAXINT_16);
426 LVC_Mixer_SetTarget(&pInstance->BypassMixer.MixerStream[1],0);
428 pInstance->BypassMixer.MixerStream[0].CallbackSet = 1;
429 pInstance->BypassMixer.MixerStream[1].CallbackSet = 1;
434 pInstance->Params.OperatingMode = LVEQNB_ON;
436 LVC_Mixer_SetTarget(&pInstance->BypassMixer.MixerStream[0],0);
437 LVC_Mixer_SetTarget(&pInstance->BypassMixer.MixerStream[1],LVM_MAXINT_16);
438 pInstance->BypassMixer.MixerStream[0].CallbackSet = 1;
439 pInstance->BypassMixer.MixerStream[1].CallbackSet = 1;
441 LVC_Mixer_VarSlope_SetTimeConstant(&pInstance->BypassMixer.MixerStream[0],LVEQNB_BYPASS_MIXER_TC,(LVM_Fs_en)pParams->SampleRate,2);
442 LVC_Mixer_VarSlope_SetTimeConstant(&pInstance->BypassMixer.MixerStream[1],LVEQNB_BYPASS_MIXER_TC,(LVM_Fs_en)pParams->SampleRate,2);
444 pInstance->bInOperatingModeTransition = LVM_TRUE;
465 LVEQNB_Instance_t *pInstance =(LVEQNB_Instance_t *)hInstance;
466 LVM_Callback CallBack = pInstance->Capabilities.CallBack;
473 if((LVC_Mixer_GetTarget(&pInstance->BypassMixer.MixerStream[0]) == 0x00000000) &&
475 pInstance->Params.OperatingMode = LVEQNB_BYPASS;
477 CallBack(pInstance->Capabilities.pBundleInstance, LVM_NULL, ALGORITHM_EQNB_ID|LVEQNB_EVENT_ALGOFF);
484 pInstance->bInOperatingModeTransition = LVM_FALSE;