Mercurial > hg > dmlib
annotate jmix_post_c.h @ 49:033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
8bit, but samples are internally upconverted to 16bit after module loading.)
Also prepare for floating point mixing support.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 01 Oct 2012 02:51:41 +0300 |
parents | ee87513fff15 |
children |
rev | line source |
---|---|
0 | 1 /* |
2 * miniJSS - Post-processing routine template | |
3 * Programmed and designed by Matti 'ccr' Hamalainen | |
4 * (C) Copyright 2005-2007 Tecnic Software productions (TNSP) | |
5 */ | |
6 | |
7 #ifdef JMIXER_HEADER | |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
48
diff
changeset
|
8 void JMIXER_NAME (JMIXER_ADDBUF_TYPE *, void *, const int); |
0 | 9 #else |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
48
diff
changeset
|
10 void JMIXER_NAME (JMIXER_ADDBUF_TYPE *addBuffer, void *mixBuffer, const int mixLength) |
0 | 11 { |
12 int strideLength = mixLength; | |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
48
diff
changeset
|
13 JMIXER_ADDBUF_TYPE *ap = addBuffer, t; |
0 | 14 JMIXER_TYPE *sp = (JMIXER_TYPE *) mixBuffer; |
15 | |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
48
diff
changeset
|
16 while (strideLength--) |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
48
diff
changeset
|
17 { |
0 | 18 t = *(ap++); |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
48
diff
changeset
|
19 JMIXER_CLAMP |
0 | 20 JMIXER_FUNCTION |
21 } | |
22 } | |
34
7908061da010
Fix building of JSS mixer parts.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
23 #endif |
0 | 24 |
25 #undef JMIXER_NAME | |
26 #undef JMIXER_TYPE | |
27 #undef JMIXER_FUNCTION |