Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1875
Modified Files: Tag: desiredata makefile.in builtins_dsp.c Log Message: compiling as C++
Index: makefile.in =================================================================== RCS file: /cvsroot/pure-data/pd/src/makefile.in,v retrieving revision 1.4.4.2.2.21.2.21 retrieving revision 1.4.4.2.2.21.2.22 diff -C2 -d -r1.4.4.2.2.21.2.21 -r1.4.4.2.2.21.2.22 *** makefile.in 3 Jan 2007 20:28:32 -0000 1.4.4.2.2.21.2.21 --- makefile.in 3 Jan 2007 20:46:57 -0000 1.4.4.2.2.21.2.22 *************** *** 21,28 **** CFLAGS += -DINSTALL_PREFIX="$(prefix)"
! SRCXX = desire.c kernel.c builtins.c SRC = m_fifo.c m_simd.c \ m_sched.c s_main.c s_inter.c s_loader.c s_path.c s_audio.c s_midi.c \ ! d_ugen.c builtins_dsp.c d_mayer_fft.c d_fftroutine.c d_resample.c d_soundfile.c
# audio drivers and midi drivers --- 21,28 ---- CFLAGS += -DINSTALL_PREFIX="$(prefix)"
! SRCXX = desire.c kernel.c builtins.c builtins_dsp.c SRC = m_fifo.c m_simd.c \ m_sched.c s_main.c s_inter.c s_loader.c s_path.c s_audio.c s_midi.c \ ! d_ugen.c d_mayer_fft.c d_fftroutine.c d_resample.c d_soundfile.c
# audio drivers and midi drivers
Index: builtins_dsp.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/builtins_dsp.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** builtins_dsp.c 3 Jan 2007 20:28:32 -0000 1.1.2.1 --- builtins_dsp.c 3 Jan 2007 20:46:57 -0000 1.1.2.2 *************** *** 877,891 **** }
- /* ----------------------- global setup routine ---------------- */ - void d_arithmetic_setup(void) - { - plus_setup(); - minus_setup(); - times_setup(); - over_setup(); - max_setup(); - min_setup(); - } - /* Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL --- 877,880 ---- *************** *** 1024,1028 **** static void tabwrite_tilde_start(t_tabwrite_tilde *x, t_floatarg f) { ! x->x_phase = (f > 0 ? f : 0); }
--- 1013,1017 ---- static void tabwrite_tilde_start(t_tabwrite_tilde *x, t_floatarg f) { ! x->x_phase = (int)(f > 0 ? f : 0); }
*************** *** 1144,1149 **** int argc, t_atom *argv) { ! long start = atom_getfloatarg(0, argc, argv); ! long length = atom_getfloatarg(1, argc, argv); if (start < 0) start = 0; if (length <= 0) --- 1133,1138 ---- int argc, t_atom *argv) { ! long start = (int)atom_getfloatarg(0, argc, argv); ! long length = (int)atom_getfloatarg(1, argc, argv); if (start < 0) start = 0; if (length <= 0) *************** *** 1221,1225 **** for (i = 0; i < n; i++) { ! int index = *in++; if (index < 0) index = 0; --- 1210,1214 ---- for (i = 0; i < n; i++) { ! int index = (int)*in++; if (index < 0) index = 0; *************** *** 1335,1339 **** { float findex = *in++; ! int index = findex; float frac, a, b, c, d, cminusb; if (index < 1) --- 1324,1328 ---- { float findex = *in++; ! int index = (int)findex; float frac, a, b, c, d, cminusb; if (index < 1) *************** *** 1463,1467 **** union tabfudge tf; float fnpoints = x->x_fnpoints; ! int mask = fnpoints - 1; float conv = fnpoints * x->x_conv; float *tab = x->x_vec, *addr; --- 1452,1456 ---- union tabfudge tf; float fnpoints = x->x_fnpoints; ! int mask = (int)(fnpoints-1); float conv = fnpoints * x->x_conv; float *tab = x->x_vec, *addr; *************** *** 1654,1658 **** { int n = sp[0]->s_n; ! int ticksper = sp[0]->s_sr/n; if (ticksper < 1) ticksper = 1; x->x_graphperiod = ticksper; --- 1643,1647 ---- { int n = sp[0]->s_n; ! int ticksper = (int)(sp[0]->s_sr/n); if (ticksper < 1) ticksper = 1; x->x_graphperiod = ticksper; *************** *** 1792,1796 **** else { ! int n = f; if (n < 0) n = 0; else if (n >= npoints) n = npoints - 1; --- 1781,1785 ---- else { ! int n = (int)f; if (n < 0) n = 0; else if (n >= npoints) n = npoints - 1; *************** *** 1849,1853 **** else { ! int n = f; float a, b, c, d, cminusb, frac, *fp; if (n >= npoints - 2) --- 1838,1842 ---- else { ! int n = (int)f; float a, b, c, d, cminusb, frac, *fp; if (n >= npoints - 2) *************** *** 1911,1915 **** else { ! int n = x->x_ft1; if (n < 0) n = 0; --- 1900,1904 ---- else { ! int n = (int)x->x_ft1; if (n < 0) n = 0; *************** *** 1944,1963 **** }
- /* ------------------------ global setup routine ------------------------- */ - - void d_array_setup(void) - { - tabwrite_tilde_setup(); - tabplay_tilde_setup(); - tabread_tilde_setup(); - tabread4_tilde_setup(); - tabosc4_tilde_setup(); - tabsend_setup(); - tabreceive_setup(); - tabread_setup(); - tabread4_setup(); - tabwrite_setup(); - } - /* Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL --- 1933,1936 ---- *************** *** 2083,2087 **** if (x->x_retarget) { ! int nticks = x->x_inletwas * x->x_dspticktomsec; if (!nticks) nticks = 1; x->x_ticksleft = nticks; --- 2056,2060 ---- if (x->x_retarget) { ! int nticks = (int)(x->x_inletwas * x->x_dspticktomsec); if (!nticks) nticks = 1; x->x_ticksleft = nticks; *************** *** 2146,2151 **** if (x->x_retarget) { ! int nticks = x->x_inletwas * x->x_dspticktomsec; ! int i; if (!nticks) nticks = 1; x->x_ticksleft = nticks; --- 2119,2124 ---- if (x->x_retarget) { ! int nticks = (int)(x->x_inletwas * x->x_dspticktomsec); ! int i; if (!nticks) nticks = 1; x->x_ticksleft = nticks; *************** *** 2185,2193 **** if (PD_BIGORSMALL(f)) x->x_value = f = 0; ! if (x->x_retarget) ! { ! int nticks = x->x_inletwas * x->x_dspticktomsec; ! int i; ! if (!nticks) nticks = 1; x->x_ticksleft = nticks; --- 2158,2164 ---- if (PD_BIGORSMALL(f)) x->x_value = f = 0; ! if (x->x_retarget) { ! int nticks = (int)(x->x_inletwas * x->x_dspticktomsec); ! int i; if (!nticks) nticks = 1; x->x_ticksleft = nticks; *************** *** 2404,2408 **** else { ! for (s1 = x->x_list; s2 = s1->s_next; s1 = s2) { if (s2->s_starttime > starttime || --- 2375,2379 ---- else { ! for (s1 = x->x_list; (s2 = s1->s_next); s1 = s2) { if (s2->s_starttime > starttime || *************** *** 2578,2582 **** if (x->x_gotone) { ! int indx = clock_gettimesince(x->x_time) * x->x_sampspermsec; if (indx < 0) indx = 0; --- 2549,2553 ---- if (x->x_gotone) { ! int indx = (int)(clock_gettimesince(x->x_time) * x->x_sampspermsec); if (indx < 0) indx = 0; *************** *** 2631,2636 **** static void *env_tilde_new(t_floatarg fnpoints, t_floatarg fperiod) { ! int npoints = fnpoints; ! int period = fperiod; t_sigenv *x; float *buf; --- 2602,2607 ---- static void *env_tilde_new(t_floatarg fnpoints, t_floatarg fperiod) { ! int npoints = (int)fnpoints; ! int period = (int)fperiod; t_sigenv *x; float *buf; *************** *** 2963,2979 **** }
- /* ------------------------ global setup routine ------------------------- */ - - void d_ctl_setup(void) - { - sig_tilde_setup(); - line_tilde_setup(); - vline_tilde_setup(); - snapshot_tilde_setup(); - vsnapshot_tilde_setup(); - env_tilde_setup(); - threshold_tilde_setup(); - } - /* Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL --- 2934,2937 ---- *************** *** 3166,3175 **** }
- void d_dac_setup(void) - { - dac_setup(); - adc_setup(); - } - /* Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL --- 3124,3127 ---- *************** *** 3182,3186 **** #include "m_simd.h"
! extern int ugen_getsortno(void);
#define DEFDELVS 64 /* LATER get this from canvas at DSP time */ --- 3134,3138 ---- #include "m_simd.h"
! extern "C" int ugen_getsortno(void);
#define DEFDELVS 64 /* LATER get this from canvas at DSP time */ *************** *** 3230,3239 **** static void *sigdelwrite_new(t_symbol *s, t_floatarg msec) { - int nsamps; t_sigdelwrite *x = (t_sigdelwrite *)pd_new(sigdelwrite_class); if (!*s->s_name) s = gensym("delwrite~"); pd_bind(&x->x_obj.ob_pd, s); x->x_sym = s; ! nsamps = msec * sys_getsr() * (float)(0.001f); if (nsamps < 1) nsamps = 1; nsamps += ((- nsamps) & (SAMPBLK - 1)); --- 3182,3190 ---- static void *sigdelwrite_new(t_symbol *s, t_floatarg msec) { t_sigdelwrite *x = (t_sigdelwrite *)pd_new(sigdelwrite_class); if (!*s->s_name) s = gensym("delwrite~"); pd_bind(&x->x_obj.ob_pd, s); x->x_sym = s; ! int nsamps = (int)(msec * sys_getsr() * (float)(0.001f)); if (nsamps < 1) nsamps = 1; nsamps += ((- nsamps) & (SAMPBLK - 1)); *************** *** 3413,3421 **** if (delwriter) { ! x->x_delsamps = (int)(0.5 + x->x_sr * x->x_deltime) ! + x->x_n - x->x_zerodel; ! if (x->x_delsamps < x->x_n) x->x_delsamps = x->x_n; else if (x->x_delsamps > delwriter->x_cspace.c_n - DEFDELVS) ! x->x_delsamps = delwriter->x_cspace.c_n - DEFDELVS; } if ( SIMD_CHKCNT(x->x_delsamps)) --- 3364,3371 ---- if (delwriter) { ! x->x_delsamps = (int)(0.5 + x->x_sr * x->x_deltime + x->x_n - x->x_zerodel); ! if (x->x_delsamps < x->x_n) x->x_delsamps = (int)x->x_n; else if (x->x_delsamps > delwriter->x_cspace.c_n - DEFDELVS) ! x->x_delsamps = (int)(delwriter->x_cspace.c_n - DEFDELVS); } if ( SIMD_CHKCNT(x->x_delsamps)) *************** *** 3577,3581 **** delsamps += fn; fn = fn - 1.0f; ! idelsamps = delsamps; frac = delsamps - (float)idelsamps; bp = wp - idelsamps; --- 3527,3531 ---- delsamps += fn; fn = fn - 1.0f; ! idelsamps = (int)delsamps; frac = delsamps - (float)idelsamps; bp = wp - idelsamps; *************** *** 3620,3632 **** }
- /* ----------------------- global setup routine ---------------- */ - - void d_delay_setup(void) - { - sigdelwrite_setup(); - sigdelread_setup(); - sigvd_setup(); - } - /* Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL --- 3570,3573 ---- *************** *** 4224,4244 **** }
- /* ------------------------ global setup routine ------------------------- */ - - void d_fft_setup(void) - { - sigframp_setup(); - - #ifndef HAVE_LIBFFTW3F - sigfft_setup(); - sigrfft_setup(); - sigrifft_setup(); - #else - sigfftw_setup(); /* added by Tim Blechmann to support fftw */ - sigrifftw_setup(); - sigrfftw_setup(); - #endif /* HAVE_LIBFFTW3F */ - - } /* Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL --- 4165,4168 ---- *************** *** 5354,5373 **** }
- /* ------------------------ setup routine ------------------------- */ - - void d_filter_setup(void) - { - sighip_setup(); - siglop_setup(); - sigbp_setup(); - sigbiquad_setup(); - sigsamphold_setup(); - sigrpole_setup(); - sigrzero_setup(); - sigrzero_rev_setup(); - sigcpole_setup(); - sigczero_setup(); - sigczero_rev_setup(); - } /* Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL --- 5278,5281 ---- *************** *** 5734,5747 **** }
- /* ----------------------- global setup routine ---------------- */ - - void d_global_setup(void) - { - sigsend_setup(); - sigreceive_setup(); - sigcatch_setup(); - sigthrow_setup(); - } - /* Copyright (c) 1997-2001 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL --- 5642,5645 ---- *************** *** 6000,6004 **** { float f = *in++; ! int k = f; if (f > 0) *out++ = f-k; else *out++ = f - (k-1); --- 5898,5902 ---- { float f = *in++; ! int k = (int)f; if (f > 0) *out++ = f-k; else *out++ = f - (k-1); *************** *** 6308,6336 **** }
- - /* ------------------------ global setup routine ------------------------- */ - - void d_math_setup(void) - { - t_symbol *s = gensym("acoustics~.pd"); - clip_setup(); - sigrsqrt_setup(); - sigsqrt_setup(); - sigwrap_setup(); - mtof_tilde_setup(); - ftom_tilde_setup(); - dbtorms_tilde_setup(); - rmstodb_tilde_setup(); - dbtopow_tilde_setup(); - powtodb_tilde_setup(); - - class_sethelpsymbol(mtof_tilde_class, s); - class_sethelpsymbol(ftom_tilde_class, s); - class_sethelpsymbol(dbtorms_tilde_class, s); - class_sethelpsymbol(rmstodb_tilde_class, s); - class_sethelpsymbol(dbtopow_tilde_class, s); - class_sethelpsymbol(powtodb_tilde_class, s); - } - /* Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL --- 6206,6209 ---- *************** *** 6387,6391 **** { if (f < 0) f = 0; ! x->x_count = f; }
--- 6260,6264 ---- { if (f < 0) f = 0; ! x->x_count = (int)f; }
*************** *** 6462,6473 **** }
- - /* ------------------------ global setup routine ------------------------- */ - - void d_misc_setup(void) - { - print_setup(); - bang_tilde_setup(); - } /* Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL --- 6335,6338 ---- *************** *** 6942,6949 **** }
- /* ----------------------- global setup routine ---------------- */ - void d_osc_setup(void) - { phasor_setup(); cos_setup(); --- 6807,6894 ---- }
+ void builtins_dsp_setup() { + plus_setup(); + minus_setup(); + times_setup(); + over_setup(); + max_setup(); + min_setup(); + + tabwrite_tilde_setup(); + tabplay_tilde_setup(); + tabread_tilde_setup(); + tabread4_tilde_setup(); + tabosc4_tilde_setup(); + tabsend_setup(); + tabreceive_setup(); + tabread_setup(); + tabread4_setup(); + tabwrite_setup(); + + sig_tilde_setup(); + line_tilde_setup(); + vline_tilde_setup(); + snapshot_tilde_setup(); + vsnapshot_tilde_setup(); + env_tilde_setup(); + threshold_tilde_setup(); + + dac_setup(); + adc_setup(); + + sigdelwrite_setup(); + sigdelread_setup(); + sigvd_setup(); + + sigframp_setup(); + #ifndef HAVE_LIBFFTW3F + sigfft_setup(); + sigrfft_setup(); + sigrifft_setup(); + #else + sigfftw_setup(); /* added by Tim Blechmann to support fftw */ + sigrifftw_setup(); + sigrfftw_setup(); + #endif /* HAVE_LIBFFTW3F */ + + sighip_setup(); + siglop_setup(); + sigbp_setup(); + sigbiquad_setup(); + sigsamphold_setup(); + sigrpole_setup(); + sigrzero_setup(); + sigrzero_rev_setup(); + sigcpole_setup(); + sigczero_setup(); + sigczero_rev_setup(); + + sigsend_setup(); + sigreceive_setup(); + sigcatch_setup(); + sigthrow_setup(); + + t_symbol *s = gensym("acoustics~.pd"); + clip_setup(); + sigrsqrt_setup(); + sigsqrt_setup(); + sigwrap_setup(); + mtof_tilde_setup(); + ftom_tilde_setup(); + dbtorms_tilde_setup(); + rmstodb_tilde_setup(); + dbtopow_tilde_setup(); + powtodb_tilde_setup(); + + class_sethelpsymbol(mtof_tilde_class, s); + class_sethelpsymbol(ftom_tilde_class, s); + class_sethelpsymbol(dbtorms_tilde_class, s); + class_sethelpsymbol(rmstodb_tilde_class, s); + class_sethelpsymbol(dbtopow_tilde_class, s); + class_sethelpsymbol(powtodb_tilde_class, s); + + print_setup(); + bang_tilde_setup();
phasor_setup(); cos_setup(); *************** *** 6952,6954 **** noise_setup(); } - --- 6897,6898 ----