Lines Matching refs:operIndex

160 static EAS_BOOL FM_SynthIsOutputOperator (const S_FM_REGION *pRegion, EAS_INT operIndex)
164 if ((pRegion->oper[operIndex].gain & 0xfc) == 0)
177 if (operIndex != 0)
183 if ((operIndex == 1) || (operIndex == 3))
189 if ((operIndex == 1) || (operIndex == 2))
196 if (operIndex == 1)
256 EAS_INT operIndex;
267 for (operIndex = 0; operIndex < 4; operIndex++)
269 pFMVoice->oper[operIndex].envState = eFMEnvelopeStateRelease;
272 pFMVoice->oper[operIndex].envRate = FM_CalcEGRate(
274 fmReleaseTable[pRegion->oper[operIndex].velocityRelease & 0x0f],
275 fmScaleTable[pRegion->oper[operIndex].egKeyScale >> 4]);
276 } /* end for (operIndex = 0; operIndex < 4; operIndex++) */
329 EAS_INT operIndex;
335 for (operIndex = 0; operIndex < 4; operIndex++)
339 if (((pRegion->oper[operIndex].gain & 0xfc) == 0) ||
340 (pFMVoice->oper[operIndex].envGain == 0))
346 if (pFMVoice->oper[operIndex].envGain >= ((EAS_U16) (pRegion->oper[operIndex].sustain & 0xfc) << 7))
350 pFMVoice->oper[operIndex].envState = eFMEnvelopeStateDecay;
352 pFMVoice->oper[operIndex].envRate = FM_CalcEGRate(
354 fmDecayTable[pRegion->oper[operIndex].attackDecay & 0x0f],
355 fmScaleTable[pRegion->oper[operIndex].egKeyScale >> 4]);
363 } /* end for (operIndex = 0; operIndex < 4; operIndex++) */
402 EAS_INT operIndex;
439 for (operIndex = 0; operIndex < 4; operIndex++)
444 pFMVoice->oper[operIndex].outputGain = EAS_LogToLinear16(((EAS_I16) (pRegion->oper[operIndex].gain & 0xfc) - 0xfc) << 7);
448 if (pRegion->oper[operIndex].flags & FM_OPER_FLAG_LINEAR_VELOCITY)
455 temp = (temp * (EAS_I32)(pRegion->oper[operIndex].velocityRelease & 0xf0)) >> 7;
458 temp -= ((EAS_I32) pVoice->note - KEY_SCALE_PIVOT_POINT) * (EAS_I32) fmScaleTable[pRegion->oper[operIndex].egKeyScale & 0x0f];
465 pFMVoice->oper[operIndex].baseGain = (EAS_I16) EAS_LogToLinear16(temp);
468 pFMVoice->oper[operIndex].envRate = FM_CalcEGRate(
470 fmDecayTable[pRegion->oper[operIndex].attackDecay & 0x0f],
471 fmScaleTable[pRegion->oper[operIndex].egKeyScale >> 4]);
474 if ((pRegion->oper[operIndex].attackDecay & 0xf0) == 0xf0)
478 pFMVoice->oper[operIndex].envGain = 0x7fff;
481 pFMVoice->oper[operIndex].envState = eFMEnvelopeStateDecay;
487 pFMVoice->oper[operIndex].envGain = 0;
488 pFMVoice->oper[operIndex].envState = eFMEnvelopeStateAttack;
733 EAS_INT operIndex;
752 for (operIndex = 0; operIndex < 4; operIndex++)
757 temp = pRegion->oper[operIndex].tuning +
761 if ((pRegion->oper[operIndex].flags & FM_OPER_FLAG_NO_VIBRATO) == 0)
765 if (pRegion->oper[operIndex].flags & FM_OPER_FLAG_MONOTONE)
769 pFMVoice->oper[operIndex].pitch = (EAS_I16) temp;
772 bTemp = FM_UpdateEG(pVoice, &pFMVoice->oper[operIndex], &pRegion->oper[operIndex], pRegion->region.keyGroupAndFlags & REGION_FLAG_ONE_SHOT);
775 if (FM_SynthIsOutputOperator(pRegion, operIndex))