Mercurial > hg > dmlib
annotate jmixtmpl_c.h @ 100:f16d102dbbac
Add a function for setting bitmapped font palette.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 02 Oct 2012 20:33:01 +0300 |
parents | 2edda27f951c |
children | 1ba202b448e0 |
rev | line source |
---|---|
0 | 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 | |
51
36e2f910219c
A non-working implementation of floating point audio mixing.
Matti Hamalainen <ccr@tnsp.org>
parents:
49
diff
changeset
|
8 int JMIXER_NAME (JSSMixer *, JSSChannel *, JMIXER_ADDBUF_TYPE *, const int, const Sint32); |
0 | 9 #else |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
10 int JMIXER_NAME (JSSMixer *mixer, JSSChannel *chn, JMIXER_ADDBUF_TYPE *addBuffer, const int mixLength, const Sint32 endPos) |
0 | 11 { |
12 const DMFixedPoint tmpDelta = chn->chDeltaO; | |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
13 DMFixedPoint tmpPos = chn->chPos; |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
14 JMIXER_ADDBUF_TYPE |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
15 *ap = addBuffer, |
57
2edda27f951c
Silly interpolation in mixing.
Matti Hamalainen <ccr@tnsp.org>
parents:
51
diff
changeset
|
16 *tr = chn->chPrevR, |
2edda27f951c
Silly interpolation in mixing.
Matti Hamalainen <ccr@tnsp.org>
parents:
51
diff
changeset
|
17 *tl = chn->chPrevL; |
0 | 18 int strideLength = 0; |
57
2edda27f951c
Silly interpolation in mixing.
Matti Hamalainen <ccr@tnsp.org>
parents:
51
diff
changeset
|
19 |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
20 JMIXER_SAMPLE_TYPE *sp = (JMIXER_SAMPLE_TYPE *) chn->chData; |
0 | 21 |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
22 JMIXER_INIT |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
23 |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
24 while (strideLength < mixLength && JMIXER_ENDCOND) |
0 | 25 { |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
26 JMIXER_FUNC |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
27 JMIXER_DEBUG |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
28 JMIXER_NEXT |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
29 strideLength++; |
0 | 30 } |
31 | |
32 chn->chPos.dw = tmpPos.dw; | |
33 return strideLength; | |
34 } | |
35
fb5200deeda8
Another fix, related to 7908061da010.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
35 #endif |
0 | 36 |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
37 #undef JMIXER_NAME |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
38 #undef JMIXER_NEXT |
0 | 39 #undef JMIXER_ENDCOND |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
47
diff
changeset
|
40 |