Mercurial > hg > dmlib
diff 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 |
line wrap: on
line diff
--- a/jmix_post_c.h Mon Oct 01 01:29:26 2012 +0300 +++ b/jmix_post_c.h Mon Oct 01 02:51:41 2012 +0300 @@ -5,16 +5,18 @@ */ #ifdef JMIXER_HEADER -void JMIXER_NAME (Sint32 *, void *, const int); +void JMIXER_NAME (JMIXER_ADDBUF_TYPE *, void *, const int); #else -void JMIXER_NAME (Sint32 *addBuffer, void *mixBuffer, const int mixLength) +void JMIXER_NAME (JMIXER_ADDBUF_TYPE *addBuffer, void *mixBuffer, const int mixLength) { int strideLength = mixLength; - Sint32 *ap = addBuffer, t; + JMIXER_ADDBUF_TYPE *ap = addBuffer, t; JMIXER_TYPE *sp = (JMIXER_TYPE *) mixBuffer; - while (strideLength--) { + while (strideLength--) + { t = *(ap++); + JMIXER_CLAMP JMIXER_FUNCTION } }