From e728a5bc3db296b4b67c2d3e5b56558c42c566a8 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 21 Jun 2004 14:08:57 +0000 Subject: "" svn path=/trunk/; revision=1826 --- externals/grill/dyn/src/main.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'externals/grill/dyn/src/main.cpp') diff --git a/externals/grill/dyn/src/main.cpp b/externals/grill/dyn/src/main.cpp index 38897c5d..4447d7a4 100644 --- a/externals/grill/dyn/src/main.cpp +++ b/externals/grill/dyn/src/main.cpp @@ -2,7 +2,7 @@ dyn~ - dynamical object management for PD -Copyright (c) 2003 Thomas Grill (xovo@gmx.net) +Copyright (c)2003-2004 Thomas Grill (xovo@gmx.net) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. @@ -13,11 +13,11 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include -#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 405) -#error You need at least flext version 0.4.5 +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) +#error You need at least flext version 0.4.6 #endif -#define DYN_VERSION "0.1.0" +#define DYN_VERSION "0.1.1pre" #if FLEXT_SYS != FLEXT_SYS_PD @@ -96,7 +96,7 @@ protected: void init(dyn *t); - static void px_exit(proxy *px) { if(px->buf) delete[] px->buf; } + static void px_exit(proxy *px) { if(px->buf) FreeAligned(px->buf); } }; // proxy for inbound messages @@ -685,14 +685,13 @@ void dyn::proxy::init(dyn *t) defsig = 0; } - void dyn::proxyin::dsp(proxyin *x,t_signal **sp) { int n = sp[0]->s_n; if(n != x->n) { // if vector size has changed make new buffer - if(x->buf) delete[] x->buf; - x->buf = new t_sample[x->n = n]; + if(x->buf) FreeAligned(x->buf); + x->buf = (t_sample *)NewAligned(sizeof(t_sample)*(x->n = n)); } dsp_add_copy(x->buf,sp[0]->s_vec,n); } @@ -711,8 +710,8 @@ void dyn::proxyout::dsp(proxyout *x,t_signal **sp) int n = sp[0]->s_n; if(n != x->n) { // if vector size has changed make new buffer - if(x->buf) delete[] x->buf; - x->buf = new t_sample[x->n = n]; + if(x->buf) FreeAligned(x->buf); + x->buf = (t_sample *)NewAligned(sizeof(t_sample)*(x->n = n)); } dsp_add_copy(sp[0]->s_vec,x->buf,n); } -- cgit v1.2.1