view jmixtmpl_c.h @ 164:a49d431ff40e

Add a hardcoded font to PPL.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 06 Oct 2012 08:00:34 +0300
parents 111f3e4b57ad
children 301de8c0cd01
line wrap: on
line source

/*
 * miniJSS - Mixing routine in C, innerloop template
 * Programmed and designed by Matti 'ccr' Hamalainen
 * (C) Copyright 2006-2007 Tecnic Software productions (TNSP)
 */

#ifdef JMIXER_HEADER
int JMIXER_NAME (JSSMixer *, JSSChannel *, JMIXER_ADDBUF_TYPE *, const int, const Sint32);
#else
int JMIXER_NAME (JSSMixer *mixer, JSSChannel *chn, JMIXER_ADDBUF_TYPE *addBuffer, const int mixLength, const Sint32 endPos)
{
    const DMFixedPoint tmpDelta = chn->chDeltaO, tmpDeltaV = chn->chDeltaV;
    DMFixedPoint tmpPos = chn->chPos, tmpVolume = chn->chVolume;
    JMIXER_ADDBUF_TYPE
        *ap = addBuffer,
        *tr = chn->chPrevR,
        *tl = chn->chPrevL;
    int strideLength = 0, tmpVolumeD = chn->chVolumeD;;

    JMIXER_SAMPLE_TYPE *sp = (JMIXER_SAMPLE_TYPE *) chn->chData;

    JMIXER_INIT

    while (strideLength < mixLength && JMIXER_ENDCOND)
    {
        JMIXER_FUNC
        JMIXER_DEBUG
        JMIXER_NEXT
        if (tmpVolumeD)
        {
            tmpVolumeD--;
            FP_ADD(tmpVolume, tmpDeltaV);
        }
        strideLength++;
    }

    chn->chPos = tmpPos;
    chn->chVolume = tmpVolume;
    chn->chVolumeD = tmpVolumeD;
    return strideLength;
}
#endif

#undef JMIXER_NAME
#undef JMIXER_NEXT
#undef JMIXER_ENDCOND