From 9c0e19a3be2288db79e2502e5fa450c3e20a668d Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Fri, 9 May 2003 16:04:00 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r610, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=611 --- pd/src/d_dac.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'pd/src/d_dac.c') diff --git a/pd/src/d_dac.c b/pd/src/d_dac.c index 620adba5..c090a214 100644 --- a/pd/src/d_dac.c +++ b/pd/src/d_dac.c @@ -5,7 +5,8 @@ /* The dac~ and adc~ routines. */ -#include "m_imp.h" +#include "m_pd.h" +#include "s_stuff.h" /* ----------------------------- dac~ --------------------------- */ static t_class *dac_class; @@ -47,11 +48,11 @@ static void dac_dsp(t_dac *x, t_signal **sp) for (i = x->x_n, ip = x->x_vec, sp2 = sp; i--; ip++, sp2++) { int ch = *ip - 1; - if ((*sp2)->s_n != DACBLKSIZE) + if ((*sp2)->s_n != DEFDACBLKSIZE) error("dac~: bad vector size"); else if (ch >= 0 && ch < sys_get_outchannels()) - dsp_add(plus_perform, 4, sys_soundout + DACBLKSIZE*ch, - (*sp2)->s_vec, sys_soundout + DACBLKSIZE*ch, DACBLKSIZE); + dsp_add(plus_perform, 4, sys_soundout + DEFDACBLKSIZE*ch, + (*sp2)->s_vec, sys_soundout + DEFDACBLKSIZE*ch, DEFDACBLKSIZE); } } @@ -153,12 +154,12 @@ static void adc_dsp(t_adc *x, t_signal **sp) for (i = x->x_n, ip = x->x_vec, sp2 = sp; i--; ip++, sp2++) { int ch = *ip - 1; - if ((*sp2)->s_n != DACBLKSIZE) + if ((*sp2)->s_n != DEFDACBLKSIZE) error("adc~: bad vector size"); else if (ch >= 0 && ch < sys_get_inchannels()) - dsp_add_copy(sys_soundin + DACBLKSIZE*ch, - (*sp2)->s_vec, DACBLKSIZE); - else dsp_add_zero((*sp2)->s_vec, DACBLKSIZE); + dsp_add_copy(sys_soundin + DEFDACBLKSIZE*ch, + (*sp2)->s_vec, DEFDACBLKSIZE); + else dsp_add_zero((*sp2)->s_vec, DEFDACBLKSIZE); } } @@ -170,7 +171,7 @@ static void adc_free(t_adc *x) static void adc_setup(void) { adc_class = class_new(gensym("adc~"), (t_newmethod)adc_new, - (t_method)adc_free, sizeof(t_adc), 0, A_GIMME, 0); + (t_method)adc_free, sizeof(t_adc), CLASS_NOINLET, A_GIMME, 0); class_addmethod(adc_class, (t_method)adc_dsp, gensym("dsp"), A_CANT, 0); class_sethelpsymbol(adc_class, gensym("adc~_dac~")); } -- cgit v1.2.1