Mercurial > audlegacy
diff src/libSAD/noicegen.c @ 4233:74c6f3d3cf1d
it buids successfully :)
author | Eugene Zagidullin <e.asphyx@gmail.com> |
---|---|
date | Wed, 30 Jan 2008 03:36:22 +0300 |
parents | 704607c1f858 |
children | b293ce14a01a |
line wrap: on
line diff
--- a/src/libSAD/noicegen.c Wed Jan 30 01:22:37 2008 +0300 +++ b/src/libSAD/noicegen.c Wed Jan 30 03:36:22 2008 +0300 @@ -2,16 +2,17 @@ #include <assert.h> #include "../../config.h" +#ifdef HAVE_SSE2 +# define SSE2 1 +#endif + +#ifdef HAVE_ALTIVEC +# define ALTIVEC 1 +#endif + #define MEXP 19937 -#ifdef HAVE_SSE2 -#define SSE2 1 -#endif -#ifdef HAVE_ALTIVEC -#define ALTIVEC 1 -#endif - -#include "SFMT.h" +/*#include "SFMT.h"*/ #include "SFMT.c" #include "noicegen.h" @@ -33,3 +34,9 @@ return v; } + +float triangular_dither_noise_f() { + // Сonditionally assume we have 16 bits in fractional part + // Please, check it thoroughly: is this assumption correct in floatin-point arithmetic? + return (float) triangular_dither_noise(17) / 65536.0; +}