Home | History | Annotate | Download | only in lib_src

Lines Matching refs:gain

182  * Calculate the gain for the next frame
185 static EAS_I32 DLS_UpdateGain (S_WT_VOICE *pWTVoice, const S_DLS_ARTICULATION *pDLSArt, S_SYNTH_CHANNEL *pChannel, EAS_I32 gain, EAS_U8 velocity)
201 gain += FMUL_15x15(temp, pWTVoice->modLFO.lfoValue);
202 if (gain > 0)
203 gain = 0;
205 /* convert to linear gain including EG1 */
208 gain = (DLS_GAIN_FACTOR * gain) >> DLS_GAIN_SHIFT;
211 gain += (pWTVoice->eg1Value - 32767) >> 1;
212 gain = EAS_LogToLinear16(gain);
214 gain = EAS_LogToLinear16(gain);
216 gain = FMUL_15x15(gain, temp);
221 gain = (DLS_GAIN_FACTOR * gain) >> DLS_GAIN_SHIFT;
222 gain = EAS_LogToLinear16(gain);
223 gain = FMUL_15x15(gain, pWTVoice->eg1Value);
226 /* include MIDI channel gain */
227 gain = FMUL_15x15(gain, pChannel->staticGain);
234 gain = FMUL_15x15(gain, temp);
237 /* return gain */
238 return gain;
334 /* initalize the envelopes and calculate initial gain */
337 pVoice->gain = (EAS_I16) DLS_UpdateGain(pWTVoice, pDLSArt, pChannel, pDLSRegion->wtRegion.gain, pVoice->velocity);
413 /* calculate gain including modulation effects */
414 intFrame.frame.gainTarget = DLS_UpdateGain(pWTVoice, pDLSArt, pChannel, pDLSRegion->wtRegion.gain, pVoice->velocity);
415 intFrame.prevGain = pVoice->gain;
435 /* if the update interval has elapsed, then force the current gain to the next
436 * gain since we never actually reach the next gain when ramping -- we just get
437 * very close to the target gain.
439 pVoice->gain = (EAS_I16) intFrame.frame.gainTarget;