Lines Matching refs:pWTVoice
49 extern void WT_NoiseGenerator (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame);
50 extern void WT_VoiceGain (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame);
53 extern void WT_InterpolateMono (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame);
55 extern void WT_InterpolateNoLoop (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame);
56 extern void WT_Interpolate (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame);
81 void WT_VoiceGain (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) in WT_VoiceGain() argument
112 gainLeft = pWTVoice->gainLeft; in WT_VoiceGain()
113 gainRight = pWTVoice->gainRight; in WT_VoiceGain()
181 void WT_Interpolate (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) in WT_Interpolate() argument
202 loopEnd = (const EAS_SAMPLE*) pWTVoice->loopEnd + 1; in WT_Interpolate()
203 pSamples = (const EAS_SAMPLE*) pWTVoice->phaseAccum; in WT_Interpolate()
205 phaseFrac = pWTVoice->phaseFrac; in WT_Interpolate()
246 pSamples = (const EAS_SAMPLE*) pWTVoice->loopStart + acc0; in WT_Interpolate()
262 pWTVoice->phaseAccum = (EAS_U32) pSamples; in WT_Interpolate()
263 pWTVoice->phaseFrac = (EAS_U32) phaseFrac; in WT_Interpolate()
280 void WT_InterpolateNoLoop (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) in WT_InterpolateNoLoop() argument
302 bufferEndP1 = (const EAS_SAMPLE*) pWTVoice->loopEnd + 1; in WT_InterpolateNoLoop()
303 pSamples = (const EAS_SAMPLE*) pWTVoice->phaseAccum; in WT_InterpolateNoLoop()
304 phaseFrac = (EAS_I32)(pWTVoice->phaseFrac & PHASE_FRAC_MASK); in WT_InterpolateNoLoop()
362 pWTVoice->phaseAccum = (EAS_U32) pSamples; in WT_InterpolateNoLoop()
363 pWTVoice->phaseFrac = (EAS_U32) phaseFrac; in WT_InterpolateNoLoop()
451 void NO_INT_OVERFLOW_CHECKS WT_NoiseGenerator (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) in WT_NoiseGenerator() argument
472 tmp0 = (EAS_I32) (pWTVoice->phaseAccum) >> 18; in WT_NoiseGenerator()
474 tmp1 = (EAS_I32) (pWTVoice->loopEnd) >> 18; in WT_NoiseGenerator()
478 nInterpolatedSample = MULT_AUDIO_COEF( tmp0, (PHASE_ONE - pWTVoice->phaseFrac)); in WT_NoiseGenerator()
479 nInterpolatedSample += MULT_AUDIO_COEF( tmp1, pWTVoice->phaseFrac); in WT_NoiseGenerator()
483 pWTVoice->phaseFrac += (EAS_U32) phaseInc; in WT_NoiseGenerator()
484 if (GET_PHASE_INT_PART(pWTVoice->phaseFrac)) { in WT_NoiseGenerator()
486 pWTVoice->phaseAccum = pWTVoice->loopEnd; in WT_NoiseGenerator()
487 pWTVoice->loopEnd = (5 * pWTVoice->loopEnd + 1); in WT_NoiseGenerator()
488 tmp1 = (EAS_I32) (pWTVoice->loopEnd) >> 18; in WT_NoiseGenerator()
489 pWTVoice->phaseFrac = GET_PHASE_FRAC_PART(pWTVoice->phaseFrac); in WT_NoiseGenerator()
512 void WT_ProcessVoice (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) in WT_ProcessVoice() argument
516 if (pWTVoice->loopStart == WT_NOISE_GENERATOR) in WT_ProcessVoice()
517 WT_NoiseGenerator(pWTVoice, pWTIntFrame); in WT_ProcessVoice()
520 else if (pWTVoice->loopStart != pWTVoice->loopEnd) in WT_ProcessVoice()
521 WT_Interpolate(pWTVoice, pWTIntFrame); in WT_ProcessVoice()
526 WT_InterpolateNoLoop(pWTVoice, pWTIntFrame); in WT_ProcessVoice()
531 WT_VoiceFilter(&pWTVoice->filter, pWTIntFrame); in WT_ProcessVoice()
543 gainLeft = (pWTIntFrame->prevGain * pWTVoice->gainLeft) << 1; in WT_ProcessVoice()
544 …gainIncLeft = (((pWTIntFrame->frame.gainTarget * pWTVoice->gainLeft) << 1) - gainLeft) >> SYNTH_UP… in WT_ProcessVoice()
547 gainRight = (pWTIntFrame->prevGain * pWTVoice->gainRight) << 1; in WT_ProcessVoice()
548 …gainIncRight = (((pWTIntFrame->frame.gainTarget * pWTVoice->gainRight) << 1) - gainRight) >> SYNTH… in WT_ProcessVoice()
574 WT_VoiceGain(pWTVoice, pWTIntFrame); in WT_ProcessVoice()
594 void WT_InterpolateMono (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) in WT_InterpolateMono() argument
623 pCurrentPhaseInt = pWTVoice->pPhaseAccum; in WT_InterpolateMono()
624 currentPhaseFrac = pWTVoice->phaseFrac; in WT_InterpolateMono()
627 pLoopStart = pWTVoice->pLoopStart; in WT_InterpolateMono()
628 pLoopEnd = pWTVoice->pLoopEnd + 1; in WT_InterpolateMono()
661 pWTVoice->pPhaseAccum = pCurrentPhaseInt; in WT_InterpolateMono()
662 pWTVoice->phaseFrac = currentPhaseFrac; in WT_InterpolateMono()
664 pWTVoice->gain = (EAS_I16)(gain >> SYNTH_UPDATE_PERIOD_IN_BITS); in WT_InterpolateMono()
687 void WT_ProcessVoice (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame) in WT_ProcessVoice() argument
691 if (pWTVoice->loopStart== WT_NOISE_GENERATOR) in WT_ProcessVoice()
693 WT_NoiseGenerator(pWTVoice, pWTIntFrame); in WT_ProcessVoice()
694 WT_VoiceGain(pWTVoice, pWTIntFrame); in WT_ProcessVoice()
700 WT_InterpolateMono(pWTVoice, pWTIntFrame); in WT_ProcessVoice()