From c70554786db3e32ce5601b11d29d25db08cb2b37 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 13 Dec 2007 05:28:54 +0000 Subject: - reorganized files to build easy with Pd-extended. - updated NT macro to _MSC_VER since those pragmas are for MSVC only - put each object's "fill" function into that object's .c file, - added i0.c to the end of kaiser~.c since that's the only one that needs it - added #define powf pow for _WIN32 and Mac OS X for gaussian~.c since those platforms don't have single precision pow() by default svn path=/trunk/externals/windowing/; revision=9092 --- connes~.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'connes~.c') diff --git a/connes~.c b/connes~.c index 5df68b0..5f5a017 100644 --- a/connes~.c +++ b/connes~.c @@ -20,14 +20,25 @@ */ #include "m_pd.h" -#include "windowFunctions.h" #include -#ifdef NT + +#ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif + #define DEFBLOCKSIZE 64 +void fillConnes(float *vec, int n) { + int i; + float xShift = (float)n / 2; + float x; + for (i = 0; i < n; i++) { + x = (i - xShift) / xShift; + vec[i] = (float)((1 - (x * x)) * (1 - (x * x))); + } +} + static t_class *connes_class; typedef struct _connes { -- cgit v1.2.1