comparison jmixtmpl_c.h @ 47:1936fc1a6c18

Renamed again, bah.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 01 Oct 2012 01:18:28 +0300
parents jmixtmpl_c.c@b30430da2815
children 033c660c25f5
comparison
equal deleted inserted replaced
46:f939d3896937 47:1936fc1a6c18
1 /*
2 * miniJSS - Mixing routine in C, innerloop template
3 * Programmed and designed by Matti 'ccr' Hamalainen
4 * (C) Copyright 2006-2007 Tecnic Software productions (TNSP)
5 */
6
7 #ifdef JMIXER_HEADER
8 int JMIXER_NAME (JSSMixer *, JSSChannel *, Sint32 *, const int, const Sint32);
9 #else
10 int JMIXER_NAME (JSSMixer *mixer, JSSChannel *chn, Sint32 *addBuffer, const int mixLength, const Sint32 endPos)
11 {
12 const JSSVolumeTable *volTab8 = (const JSSVolumeTable *) &(mixer->volTab8);
13 Sint32 *ap = addBuffer;
14 Sint32 tr = chn->chPrevR, tl = chn->chPrevL;
15 DMFixedPoint tmpPos = chn->chPos;
16 const DMFixedPoint tmpDelta = chn->chDeltaO;
17 int strideLength = 0;
18
19 if (chn->chFlags & jsf16bit)
20 {
21 Sint16 *sp = (Sint16 *) chn->chData;
22 JMIXER_INIT
23
24 while (strideLength < mixLength && JMIXER_ENDCOND)
25 {
26 JMIXER_FUNC_16
27 JMIXER_DEBUG
28 JMIXER_NEXT
29 strideLength++;
30 }
31 }
32 else
33 {
34 Uint8 *sp = (Uint8 *) chn->chData;
35 JMIXER_INIT
36
37 while (strideLength < mixLength && JMIXER_ENDCOND)
38 {
39 JMIXER_FUNC_8
40 JMIXER_DEBUG
41 JMIXER_NEXT
42 strideLength++;
43 }
44
45 }
46
47 chn->chPos.dw = tmpPos.dw;
48 chn->chPrevR = tr; chn->chPrevL = tl;
49 return strideLength;
50 }
51 #endif
52
53 #undef JMIXER_NAME
54 #undef JMIXER_NEXT
55 #undef JMIXER_ENDCOND