Lines Matching refs:pChorusData
87 S_CHORUS_OBJECT *pChorusData; in ChorusInit() local
93 pChorusData = EAS_CMEnumFXData(EAS_MODULE_CHORUS); in ChorusInit()
97 pChorusData = EAS_HWMalloc(pEASData->hwInstData, sizeof(S_CHORUS_OBJECT)); in ChorusInit()
99 if (pChorusData == NULL) in ChorusInit()
106 EAS_HWMemSet(pChorusData, 0, sizeof(S_CHORUS_OBJECT)); in ChorusInit()
108 ChorusReadInPresets(pChorusData); in ChorusInit()
111 pChorusData->bypass = EAS_CHORUS_BYPASS_DEFAULT; in ChorusInit()
112 pChorusData->preset = EAS_CHORUS_PRESET_DEFAULT; in ChorusInit()
113 pChorusData->m_nLevel = EAS_CHORUS_LEVEL_DEFAULT; in ChorusInit()
114 pChorusData->m_nRate = EAS_CHORUS_RATE_DEFAULT; in ChorusInit()
115 pChorusData->m_nDepth = EAS_CHORUS_DEPTH_DEFAULT; in ChorusInit()
124 pChorusData->m_nRate = (EAS_I16) in ChorusInit()
125 … ((((EAS_I32)CHORUS_SHAPE_SIZE<<16)/(20*(EAS_I32)_OUTPUT_SAMPLE_RATE)) * pChorusData->m_nRate); in ChorusInit()
131 pChorusData->m_nDepth = (EAS_I16) in ChorusInit()
132 (((((EAS_I32)pChorusData->m_nDepth * _OUTPUT_SAMPLE_RATE)>>5) * 105) >> 16); in ChorusInit()
134 pChorusData->m_nLevel = pChorusData->m_nLevel; in ChorusInit()
139 pChorusData->chorusDelayL[index] = 0; in ChorusInit()
143 pChorusData->chorusDelayR[index] = 0; in ChorusInit()
147 pChorusData->chorusIndexL = 0; in ChorusInit()
148 pChorusData->chorusIndexR = 0; in ChorusInit()
152 pChorusData->lfoLPhase = 0; in ChorusInit()
153 …pChorusData->lfoRPhase = (CHORUS_SHAPE_SIZE << 16) >> 2; // 1/4 of total, i.e. 90 degrees out of p… in ChorusInit()
157 pChorusData->chorusTapPosition = (EAS_I16)((CHORUS_DELAY_MS * _OUTPUT_SAMPLE_RATE)/1000); in ChorusInit()
160 pPreset = &pChorusData->m_sPreset.m_sPreset[pChorusData->m_nNextChorus]; in ChorusInit()
162 pChorusData->m_nLevel = pPreset->m_nLevel; in ChorusInit()
163 pChorusData->m_nRate = pPreset->m_nRate; in ChorusInit()
164 pChorusData->m_nDepth = pPreset->m_nDepth; in ChorusInit()
166 pChorusData->m_nRate = (EAS_I16) in ChorusInit()
167 … ((((EAS_I32)CHORUS_SHAPE_SIZE<<16)/(20*(EAS_I32)_OUTPUT_SAMPLE_RATE)) * pChorusData->m_nRate); in ChorusInit()
170 pChorusData->m_nDepth = (EAS_I16) in ChorusInit()
171 (((((EAS_I32)pChorusData->m_nDepth * _OUTPUT_SAMPLE_RATE)>>5) * 105) >> 16); in ChorusInit()
173 *pInstData = pChorusData; in ChorusInit()
268 S_CHORUS_OBJECT *pChorusData; in ChorusProcess() local
270 pChorusData = (S_CHORUS_OBJECT*) pInstData; in ChorusProcess()
273 if (pChorusData->bypass == EAS_TRUE || pChorusData->m_nLevel == 0) in ChorusProcess()
280 if (pChorusData->m_nNextChorus != pChorusData->m_nCurrentChorus) in ChorusProcess()
282 ChorusUpdate(pChorusData); in ChorusProcess()
299 pChorusData->chorusDelayL[pChorusData->chorusIndexL] = nInputSample; in ChorusProcess()
303 … lfoValueLeft = WeightedTap(EAS_chorusShape, 0, pChorusData->lfoLPhase, CHORUS_SHAPE_SIZE); in ChorusProcess()
308 positionOffsetL = pChorusData->m_nDepth * (((EAS_I32)lfoValueLeft) << 1); in ChorusProcess()
311 positionOffsetL += ((EAS_I32)pChorusData->chorusTapPosition) << 16; in ChorusProcess()
314 …tapL = WeightedTap(pChorusData->chorusDelayL, pChorusData->chorusIndexL, positionOffsetL, CHORUS_L… in ChorusProcess()
317 tempValue = MULT_EG1_EG1(tapL, pChorusData->m_nLevel); in ChorusProcess()
326 if ((pChorusData->chorusIndexL+=1) >= CHORUS_L_SIZE) in ChorusProcess()
327 pChorusData->chorusIndexL = 0; in ChorusProcess()
330 pChorusData->lfoLPhase += pChorusData->m_nRate; in ChorusProcess()
331 while (pChorusData->lfoLPhase >= (CHORUS_SHAPE_SIZE<<16)) in ChorusProcess()
333 pChorusData->lfoLPhase -= (CHORUS_SHAPE_SIZE<<16); in ChorusProcess()
345 pChorusData->chorusDelayR[pChorusData->chorusIndexR] = nInputSample; in ChorusProcess()
349 … lfoValueRight = WeightedTap(EAS_chorusShape, 0, pChorusData->lfoRPhase, CHORUS_SHAPE_SIZE); in ChorusProcess()
354 positionOffsetR = pChorusData->m_nDepth * (((EAS_I32)lfoValueRight) << 1); in ChorusProcess()
357 positionOffsetR += ((EAS_I32)pChorusData->chorusTapPosition) << 16; in ChorusProcess()
360 …tapR = WeightedTap(pChorusData->chorusDelayR, pChorusData->chorusIndexR, positionOffsetR, CHORUS_R… in ChorusProcess()
363 tempValue = MULT_EG1_EG1(tapR, pChorusData->m_nLevel); in ChorusProcess()
371 if ((pChorusData->chorusIndexR+=1) >= CHORUS_R_SIZE) in ChorusProcess()
372 pChorusData->chorusIndexR = 0; in ChorusProcess()
375 pChorusData->lfoRPhase += pChorusData->m_nRate; in ChorusProcess()
376 while (pChorusData->lfoRPhase >= (CHORUS_SHAPE_SIZE<<16)) in ChorusProcess()
378 pChorusData->lfoRPhase -= (CHORUS_SHAPE_SIZE<<16); in ChorusProcess()
529 static EAS_RESULT ChorusReadInPresets(S_CHORUS_OBJECT *pChorusData) in ChorusReadInPresets() argument
538 S_CHORUS_PRESET *pPreset = &pChorusData->m_sPreset.m_sPreset[defaultPreset]; in ChorusReadInPresets()
585 static EAS_RESULT ChorusUpdate(S_CHORUS_OBJECT *pChorusData) in ChorusUpdate() argument
587 S_CHORUS_PRESET *pPreset = &pChorusData->m_sPreset.m_sPreset[pChorusData->m_nNextChorus]; in ChorusUpdate()
589 pChorusData->m_nLevel = pPreset->m_nLevel; in ChorusUpdate()
590 pChorusData->m_nRate = pPreset->m_nRate; in ChorusUpdate()
591 pChorusData->m_nDepth = pPreset->m_nDepth; in ChorusUpdate()
593 pChorusData->m_nRate = (EAS_I16) in ChorusUpdate()
594 … ((((EAS_I32)CHORUS_SHAPE_SIZE<<16)/(20*(EAS_I32)_OUTPUT_SAMPLE_RATE)) * pChorusData->m_nRate); in ChorusUpdate()
597 pChorusData->m_nDepth = (EAS_I16) in ChorusUpdate()
598 (((((EAS_I32)pChorusData->m_nDepth * _OUTPUT_SAMPLE_RATE)>>5) * 105) >> 16); in ChorusUpdate()
600 pChorusData->m_nCurrentChorus = pChorusData->m_nNextChorus; in ChorusUpdate()