Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23773/pd/src
Modified Files: CHANGELOG.txt configure.in d_arithmetic.c d_array.c d_ctl.c d_dac.c d_delay.c d_fft.c d_fft_fftsg.c d_fft_mayer.c d_filter.c d_global.c d_math.c d_misc.c d_osc.c d_resample.c d_soundfile.c d_ugen.c g_all_guis.c g_all_guis.h g_array.c g_bang.c g_canvas.c g_canvas.h g_editor.c g_graph.c g_hdial.c g_hslider.c g_io.c g_mycanvas.c g_numbox.c g_readwrite.c g_rtext.c g_scalar.c g_template.c g_text.c g_toggle.c g_traversal.c g_vdial.c g_vslider.c g_vumeter.c m_binbuf.c m_class.c m_glob.c m_obj.c m_pd.h m_sched.c makefile.in makefile.nt notes.txt s_audio.c s_audio_jack.c s_audio_oss.c s_audio_pa.c s_entry.c s_inter.c s_loader.c s_main.c s_path.c s_print.c s_stuff.h u_main.tk x_acoustics.c x_arithmetic.c x_connective.c x_list.c x_midi.c x_misc.c x_qlist.c x_time.c Log Message: ... and again trying to check in 0.41-0 test 10
Index: s_loader.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** s_loader.c 7 Dec 2006 16:19:05 -0000 1.14 --- s_loader.c 28 Dec 2007 03:43:06 -0000 1.15 *************** *** 125,129 **** if (hexmunge) { ! memmove(symname+6, symname, strlen(symname+1)); strncpy(symname, "setup_", 6); } --- 125,129 ---- if (hexmunge) { ! memmove(symname+6, symname, strlen(symname)+1); strncpy(symname, "setup_", 6); }
Index: x_qlist.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_qlist.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** x_qlist.c 9 Oct 2006 04:36:12 -0000 1.3 --- x_qlist.c 28 Dec 2007 03:43:06 -0000 1.4 *************** *** 19,25 **** int x_onset; /* playback position */ t_clock *x_clock; ! float x_tempo; double x_whenclockset; ! float x_clockdelay; t_symbol *x_dir; t_canvas *x_canvas; --- 19,25 ---- int x_onset; /* playback position */ t_clock *x_clock; ! t_float x_tempo; double x_whenclockset; ! t_float x_clockdelay; t_symbol *x_dir; t_canvas *x_canvas; *************** *** 101,105 **** else if (!(target = ap->a_w.w_symbol->s_thing)) { ! error("qlist: %s: no such object", ap->a_w.w_symbol->s_name); continue; } --- 101,106 ---- else if (!(target = ap->a_w.w_symbol->s_thing)) { ! pd_error(x, "qlist: %s: no such object", ! ap->a_w.w_symbol->s_name); continue; } *************** *** 181,188 **** cr = 1; else if (*format->s_name) ! error("qlist_read: unknown flag: %s", format->s_name);
if (binbuf_read_via_canvas(x->x_binbuf, filename->s_name, x->x_canvas, cr)) ! error("%s: read failed", filename->s_name); x->x_onset = 0x7fffffff; x->x_reentered = 1; --- 182,189 ---- cr = 1; else if (*format->s_name) ! pd_error(x, "qlist_read: unknown flag: %s", format->s_name);
if (binbuf_read_via_canvas(x->x_binbuf, filename->s_name, x->x_canvas, cr)) ! pd_error(x, "%s: read failed", filename->s_name); x->x_onset = 0x7fffffff; x->x_reentered = 1; *************** *** 198,204 **** cr = 1; else if (*format->s_name) ! error("qlist_read: unknown flag: %s", format->s_name); if (binbuf_write(x->x_binbuf, buf, "", cr)) ! error("%s: write failed", filename->s_name); }
--- 199,205 ---- cr = 1; else if (*format->s_name) ! pd_error(x, "qlist_read: unknown flag: %s", format->s_name); if (binbuf_write(x->x_binbuf, buf, "", cr)) ! pd_error(x, "%s: write failed", filename->s_name); }
*************** *** 211,215 **** static void qlist_tempo(t_qlist *x, t_float f) { ! float newtempo; if (f < 1e-20) f = 1e-20; else if (f > 1e20) f = 1e20; --- 212,216 ---- static void qlist_tempo(t_qlist *x, t_float f) { ! t_float newtempo; if (f < 1e-20) f = 1e-20; else if (f > 1e20) f = 1e20; *************** *** 217,222 **** if (x->x_whenclockset != 0) { ! float elapsed = clock_gettimesince(x->x_whenclockset); ! float left = x->x_clockdelay - elapsed; if (left < 0) left = 0; left *= newtempo / x->x_tempo; --- 218,223 ---- if (x->x_whenclockset != 0) { ! t_float elapsed = clock_gettimesince(x->x_whenclockset); ! t_float left = x->x_clockdelay - elapsed; if (left < 0) left = 0; left *= newtempo / x->x_tempo;
Index: u_main.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** u_main.tk 28 Dec 2007 03:28:31 -0000 1.29 --- u_main.tk 28 Dec 2007 03:43:06 -0000 1.30 *************** *** 1,13 **** #!/usr/bin/wish - - # set pd_nt (bad name) 0 for unix, 1 for microsoft, and 2 for Mac OSX. - if { $tcl_platform(platform) == "windows" } { - set pd_nt 1 - } elseif { $tcl_platform(os) == "Darwin" } { - set pd_nt 2 - } else { - set pd_nt 0 - } [...1163 lines suppressed...] ! global pd_startup$x ! set pd_startup$x [lindex $pd_startup $x] ! }
set pd_nort $nort *************** *** 4241,4245 **** }
! for {set x 0} {$x < 10} {incr x} { entry $id.f$x -textvariable pd_startup$x -width 80 bind $id.f$x <KeyPress-Return> [concat startup_ok $id] --- 4373,4379 ---- }
! ! ! for {set x 0} {$x < $pd_startup_count} {incr x} { entry $id.f$x -textvariable pd_startup$x -width 80 bind $id.f$x <KeyPress-Return> [concat startup_ok $id]
Index: s_path.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_path.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** s_path.c 20 Jul 2007 03:25:20 -0000 1.13 --- s_path.c 28 Dec 2007 03:43:06 -0000 1.14 *************** *** 523,531 **** int i; t_namelist *nl; ! ! for (nl = sys_searchpath, i = 0; nl && i < 10; nl = nl->nl_next, i++) ! sys_vgui("pd_set pd_path%d "%s"\n", i, nl->nl_string); ! for (; i < 10; i++) ! sys_vgui("pd_set pd_path%d ""\n", i);
sprintf(buf, "pdtk_path_dialog %%s %d %d\n", sys_usestdpath, sys_verbose); --- 523,536 ---- int i; t_namelist *nl; ! ! sprintf(buf, "list"); ! for (nl = sys_searchpath, i = 0; nl; nl = nl->nl_next, i++) { ! if(nl->nl_string){ ! strcat(buf, " ""); ! strcat(buf, nl->nl_string); ! strcat(buf, """); ! } ! } ! sys_vgui("pd_set pd_path [%s]\n", buf);
sprintf(buf, "pdtk_path_dialog %%s %d %d\n", sys_usestdpath, sys_verbose); *************** *** 555,563 **** int i; t_namelist *nl; ! ! for (nl = sys_externlist, i = 0; nl && i < 10; nl = nl->nl_next, i++) ! sys_vgui("pd_set pd_startup%d "%s"\n", i, nl->nl_string); ! for (; i < 10; i++) ! sys_vgui("pd_set pd_startup%d ""\n", i);
sprintf(buf, "pdtk_startup_dialog %%s %d "%s"\n", sys_defeatrt, --- 560,573 ---- int i; t_namelist *nl; ! ! sprintf(buf, "list"); ! for (nl = sys_externlist, i = 0; nl; nl = nl->nl_next, i++) { ! if(nl->nl_string){ ! strcat(buf, " ""); ! strcat(buf, nl->nl_string); ! strcat(buf, """); ! } ! } ! sys_vgui("pd_set pd_startup [%s]\n", buf);
sprintf(buf, "pdtk_startup_dialog %%s %d "%s"\n", sys_defeatrt,
Index: s_stuff.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_stuff.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** s_stuff.h 18 Aug 2007 23:32:44 -0000 1.11 --- s_stuff.h 28 Dec 2007 03:43:06 -0000 1.12 *************** *** 69,73 **** extern int sys_advance_samples; /* scheduler advance in samples */ extern int sys_blocksize; /* audio I/O block size in sample frames */ ! extern float sys_dacsr; extern int sys_schedadvance; extern int sys_sleepgrain; --- 69,73 ---- extern int sys_advance_samples; /* scheduler advance in samples */ extern int sys_blocksize; /* audio I/O block size in sample frames */ ! extern t_float sys_dacsr; extern int sys_schedadvance; extern int sys_sleepgrain; *************** *** 84,88 **** void sys_set_priority(int higher); void sys_audiobuf(int nbufs); ! void sys_getmeters(float *inmax, float *outmax); void sys_listdevs(void); void sys_setblocksize(int n); --- 84,88 ---- void sys_set_priority(int higher); void sys_audiobuf(int nbufs); ! void sys_getmeters(t_sample *inmax, t_sample *outmax); void sys_listdevs(void); void sys_setblocksize(int n); *************** *** 287,293 **** extern t_printhook sys_printhook; /* set this to override printing */ extern int sys_printtostderr; - #ifdef MSW - #define vsnprintf _vsnprintf /* jsarlo -- alias this name for msw */ - #endif
/* jsarlo { */ --- 287,290 ---- *************** *** 303,307 **** EXTERN int* get_sys_schedblocksize(void ) ; EXTERN double* get_sys_time(void ) ; ! EXTERN float* get_sys_dacsr(void ) ; EXTERN int* get_sys_sleepgrain(void ) ; EXTERN int* get_sys_schedadvance(void ) ; --- 300,304 ---- EXTERN int* get_sys_schedblocksize(void ) ; EXTERN double* get_sys_time(void ) ; ! EXTERN t_float* get_sys_dacsr(void ) ; EXTERN int* get_sys_sleepgrain(void ) ; EXTERN int* get_sys_schedadvance(void ) ;
Index: CHANGELOG.txt =================================================================== RCS file: /cvsroot/pure-data/pd/src/CHANGELOG.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CHANGELOG.txt 18 Aug 2007 23:32:43 -0000 1.6 --- CHANGELOG.txt 28 Dec 2007 03:43:02 -0000 1.7 *************** *** 5,9 **** 0.41.0
! add support for callback-based audio I/O; changes in
0.40.0 --- 5,12 ---- 0.41.0
! add support for callback-based audio I/O ! headers & code changed to use t_float or t_sample instead of float (patches ! by zmoelnig). !
0.40.0
Index: d_math.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_math.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** d_math.c 20 Jul 2007 03:25:20 -0000 1.3 --- d_math.c 28 Dec 2007 03:43:03 -0000 1.4 *************** *** 17,23 **** { t_object x_obj; ! float x_f; ! t_sample x_lo; ! t_sample x_hi; } t_clip;
--- 17,23 ---- { t_object x_obj; ! t_float x_f; ! t_float x_lo; ! t_float x_hi; } t_clip;
*************** *** 37,46 **** { t_clip *x = (t_clip *)(w[1]); ! t_float *in = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) { ! float f = *in++; if (f < x->x_lo) f = x->x_lo; if (f > x->x_hi) f = x->x_hi; --- 37,46 ---- { t_clip *x = (t_clip *)(w[1]); ! t_sample *in = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) { ! t_sample f = *in++; if (f < x->x_lo) f = x->x_lo; if (f > x->x_hi) f = x->x_hi; *************** *** 126,130 **** { t_object x_obj; ! float x_f; } t_sigrsqrt;
--- 126,130 ---- { t_object x_obj; ! t_float x_f; } t_sigrsqrt;
*************** *** 141,154 **** static t_int *sigrsqrt_perform(t_int *w) { ! float *in = *(t_float **)(w+1), *out = *(t_float **)(w+2); t_int n = *(t_int *)(w+3); while (n--) { ! float f = *in; long l = *(long *)(in++); if (f < 0) *out++ = 0; else { ! float g = rsqrt_exptab[(l >> 23) & 0xff] * rsqrt_mantissatab[(l >> 13) & 0x3ff]; *out++ = 1.5 * g - 0.5 * g * g * g * f; --- 141,154 ---- static t_int *sigrsqrt_perform(t_int *w) { ! t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2); t_int n = *(t_int *)(w+3); while (n--) { ! t_sample f = *in; long l = *(long *)(in++); if (f < 0) *out++ = 0; else { ! t_sample g = rsqrt_exptab[(l >> 23) & 0xff] * rsqrt_mantissatab[(l >> 13) & 0x3ff]; *out++ = 1.5 * g - 0.5 * g * g * g * f; *************** *** 180,184 **** { t_object x_obj; ! float x_f; } t_sigsqrt;
--- 180,184 ---- { t_object x_obj; ! t_float x_f; } t_sigsqrt;
*************** *** 195,208 **** t_int *sigsqrt_perform(t_int *w) /* not static; also used in d_fft.c */ { ! float *in = *(t_float **)(w+1), *out = *(t_float **)(w+2); t_int n = *(t_int *)(w+3); while (n--) { ! float f = *in; long l = *(long *)(in++); if (f < 0) *out++ = 0; else { ! float g = rsqrt_exptab[(l >> 23) & 0xff] * rsqrt_mantissatab[(l >> 13) & 0x3ff]; *out++ = f * (1.5 * g - 0.5 * g * g * g * f); --- 195,208 ---- t_int *sigsqrt_perform(t_int *w) /* not static; also used in d_fft.c */ { ! t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2); t_int n = *(t_int *)(w+3); while (n--) { ! t_sample f = *in; long l = *(long *)(in++); if (f < 0) *out++ = 0; else { ! t_sample g = rsqrt_exptab[(l >> 23) & 0xff] * rsqrt_mantissatab[(l >> 13) & 0x3ff]; *out++ = f * (1.5 * g - 0.5 * g * g * g * f); *************** *** 231,235 **** { t_object x_obj; ! float x_f; } t_sigwrap;
--- 231,235 ---- { t_object x_obj; ! t_float x_f; } t_sigwrap;
*************** *** 246,254 **** static t_int *sigwrap_perform(t_int *w) { ! float *in = *(t_float **)(w+1), *out = *(t_float **)(w+2); t_int n = *(t_int *)(w+3); while (n--) { ! float f = *in++; int k = f; if (f > 0) *out++ = f-k; --- 246,254 ---- static t_int *sigwrap_perform(t_int *w) { ! t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2); t_int n = *(t_int *)(w+3); while (n--) { ! t_sample f = *in++; int k = f; if (f > 0) *out++ = f-k; *************** *** 276,280 **** { t_object x_obj; ! float x_f; } t_mtof_tilde;
--- 276,280 ---- { t_object x_obj; ! t_float x_f; } t_mtof_tilde;
*************** *** 291,299 **** static t_int *mtof_tilde_perform(t_int *w) { ! float *in = *(t_float **)(w+1), *out = *(t_float **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; in++, out++) { ! float f = *in; if (f <= -1500) *out = 0; else --- 291,299 ---- static t_int *mtof_tilde_perform(t_int *w) { ! t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; in++, out++) { ! t_sample f = *in; if (f <= -1500) *out = 0; else *************** *** 324,328 **** { t_object x_obj; ! float x_f; } t_ftom_tilde;
--- 324,328 ---- { t_object x_obj; ! t_float x_f; } t_ftom_tilde;
*************** *** 339,347 **** static t_int *ftom_tilde_perform(t_int *w) { ! float *in = *(t_float **)(w+1), *out = *(t_float **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; *in++, out++) { ! float f = *in; *out = (f > 0 ? 17.3123405046 * log(.12231220585 * f) : -1500); } --- 339,347 ---- static t_int *ftom_tilde_perform(t_int *w) { ! t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; *in++, out++) { ! t_sample f = *in; *out = (f > 0 ? 17.3123405046 * log(.12231220585 * f) : -1500); } *************** *** 367,371 **** { t_object x_obj; ! float x_f; } t_dbtorms_tilde;
--- 367,371 ---- { t_object x_obj; ! t_float x_f; } t_dbtorms_tilde;
*************** *** 382,390 **** static t_int *dbtorms_tilde_perform(t_int *w) { ! float *in = *(t_float **)(w+1), *out = *(t_float **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; in++, out++) { ! float f = *in; if (f <= 0) *out = 0; else --- 382,390 ---- static t_int *dbtorms_tilde_perform(t_int *w) { ! t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; in++, out++) { ! t_sample f = *in; if (f <= 0) *out = 0; else *************** *** 416,420 **** { t_object x_obj; ! float x_f; } t_rmstodb_tilde;
--- 416,420 ---- { t_object x_obj; ! t_float x_f; } t_rmstodb_tilde;
*************** *** 431,443 **** static t_int *rmstodb_tilde_perform(t_int *w) { ! float *in = *(t_float **)(w+1), *out = *(t_float **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; in++, out++) { ! float f = *in; if (f <= 0) *out = 0; else { ! float g = 100 + 20./LOGTEN * log(f); *out = (g < 0 ? 0 : g); } --- 431,443 ---- static t_int *rmstodb_tilde_perform(t_int *w) { ! t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; in++, out++) { ! t_sample f = *in; if (f <= 0) *out = 0; else { ! t_sample g = 100 + 20./LOGTEN * log(f); *out = (g < 0 ? 0 : g); } *************** *** 464,468 **** { t_object x_obj; ! float x_f; } t_dbtopow_tilde;
--- 464,468 ---- { t_object x_obj; ! t_float x_f; } t_dbtopow_tilde;
*************** *** 479,487 **** static t_int *dbtopow_tilde_perform(t_int *w) { ! float *in = *(t_float **)(w+1), *out = *(t_float **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; in++, out++) { ! float f = *in; if (f <= 0) *out = 0; else --- 479,487 ---- static t_int *dbtopow_tilde_perform(t_int *w) { ! t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; in++, out++) { ! t_sample f = *in; if (f <= 0) *out = 0; else *************** *** 513,517 **** { t_object x_obj; ! float x_f; } t_powtodb_tilde;
--- 513,517 ---- { t_object x_obj; ! t_float x_f; } t_powtodb_tilde;
*************** *** 528,540 **** static t_int *powtodb_tilde_perform(t_int *w) { ! float *in = *(t_float **)(w+1), *out = *(t_float **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; in++, out++) { ! float f = *in; if (f <= 0) *out = 0; else { ! float g = 100 + 10./LOGTEN * log(f); *out = (g < 0 ? 0 : g); } --- 528,540 ---- static t_int *powtodb_tilde_perform(t_int *w) { ! t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2); t_int n = *(t_int *)(w+3); for (; n--; in++, out++) { ! t_sample f = *in; if (f <= 0) *out = 0; else { ! t_sample g = 100 + 10./LOGTEN * log(f); *out = (g < 0 ? 0 : g); }
Index: g_rtext.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_rtext.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** g_rtext.c 2 Aug 2007 00:33:50 -0000 1.8 --- g_rtext.c 28 Dec 2007 03:43:04 -0000 1.9 *************** *** 16,23 **** #include "t_tk.h"
! #define LMARGIN 1 ! #define RMARGIN 1 #define TMARGIN 2 #define BMARGIN 2
#define SEND_FIRST 1 --- 16,29 ---- #include "t_tk.h"
! #define LMARGIN 2 ! #define RMARGIN 2 ! /* for some reason, it draws text 1 pixel lower on Mac OS X (& linux too?) */ ! #ifndef MSW #define TMARGIN 2 #define BMARGIN 2 + #else + #define TMARGIN 3 + #define BMARGIN 1 + #endif
#define SEND_FIRST 1 *************** *** 151,155 **** int *indexp) { ! float dispx, dispy; char smallbuf[200], *tempbuf; int outchars = 0, nlines = 0, ncolumns = 0, --- 157,161 ---- int *indexp) { ! t_float dispx, dispy; char smallbuf[200], *tempbuf; int outchars = 0, nlines = 0, ncolumns = 0,
Index: d_arithmetic.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_arithmetic.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** d_arithmetic.c 28 Nov 2004 21:20:42 -0000 1.3 --- d_arithmetic.c 28 Dec 2007 03:43:02 -0000 1.4 *************** *** 17,21 **** { t_object x_obj; ! float x_f; } t_plus;
--- 17,21 ---- { t_object x_obj; ! t_float x_f; } t_plus;
*************** *** 23,27 **** { t_object x_obj; ! float x_f; t_float x_g; /* inlet value */ } t_scalarplus; --- 23,27 ---- { t_object x_obj; ! t_float x_f; t_float x_g; /* inlet value */ } t_scalarplus; *************** *** 51,57 **** t_int *plus_perform(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in1++ + *in2++; --- 51,57 ---- t_int *plus_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in1++ + *in2++; *************** *** 61,75 **** t_int *plus_perf8(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 + g0; out[1] = f1 + g1; out[2] = f2 + g2; out[3] = f3 + g3; --- 61,75 ---- t_int *plus_perf8(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 + g0; out[1] = f1 + g1; out[2] = f2 + g2; out[3] = f3 + g3; *************** *** 81,87 **** t_int *scalarplus_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in++ + f; --- 81,87 ---- t_int *scalarplus_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in++ + f; *************** *** 91,102 **** t_int *scalarplus_perf8(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float g = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 + g; out[1] = f1 + g; out[2] = f2 + g; out[3] = f3 + g; --- 91,102 ---- t_int *scalarplus_perf8(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float g = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 + g; out[1] = f1 + g; out[2] = f2 + g; out[3] = f3 + g; *************** *** 150,154 **** { t_object x_obj; ! float x_f; } t_minus;
--- 150,154 ---- { t_object x_obj; ! t_float x_f; } t_minus;
*************** *** 156,160 **** { t_object x_obj; ! float x_f; t_float x_g; } t_scalarminus; --- 156,160 ---- { t_object x_obj; ! t_float x_f; t_float x_g; } t_scalarminus; *************** *** 184,190 **** t_int *minus_perform(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in1++ - *in2++; --- 184,190 ---- t_int *minus_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in1++ - *in2++; *************** *** 194,208 **** t_int *minus_perf8(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 - g0; out[1] = f1 - g1; out[2] = f2 - g2; out[3] = f3 - g3; --- 194,208 ---- t_int *minus_perf8(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 - g0; out[1] = f1 - g1; out[2] = f2 - g2; out[3] = f3 - g3; *************** *** 214,220 **** t_int *scalarminus_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in++ - f; --- 214,220 ---- t_int *scalarminus_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in++ - f; *************** *** 224,235 **** t_int *scalarminus_perf8(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float g = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 - g; out[1] = f1 - g; out[2] = f2 - g; out[3] = f3 - g; --- 224,235 ---- t_int *scalarminus_perf8(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float g = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 - g; out[1] = f1 - g; out[2] = f2 - g; out[3] = f3 - g; *************** *** 281,285 **** { t_object x_obj; ! float x_f; } t_times;
--- 281,285 ---- { t_object x_obj; ! t_float x_f; } t_times;
*************** *** 287,291 **** { t_object x_obj; ! float x_f; t_float x_g; } t_scalartimes; --- 287,291 ---- { t_object x_obj; ! t_float x_f; t_float x_g; } t_scalartimes; *************** *** 315,321 **** t_int *times_perform(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in1++ * *in2++; --- 315,321 ---- t_int *times_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in1++ * *in2++; *************** *** 325,339 **** t_int *times_perf8(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 * g0; out[1] = f1 * g1; out[2] = f2 * g2; out[3] = f3 * g3; --- 325,339 ---- t_int *times_perf8(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 * g0; out[1] = f1 * g1; out[2] = f2 * g2; out[3] = f3 * g3; *************** *** 345,351 **** t_int *scalartimes_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in++ * f; --- 345,351 ---- t_int *scalartimes_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) *out++ = *in++ * f; *************** *** 355,366 **** t_int *scalartimes_perf8(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float g = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 * g; out[1] = f1 * g; out[2] = f2 * g; out[3] = f3 * g; --- 355,366 ---- t_int *scalartimes_perf8(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float g = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 * g; out[1] = f1 * g; out[2] = f2 * g; out[3] = f3 * g; *************** *** 411,415 **** { t_object x_obj; ! float x_f; } t_over;
--- 411,415 ---- { t_object x_obj; ! t_float x_f; } t_over;
*************** *** 417,421 **** { t_object x_obj; ! float x_f; t_float x_g; } t_scalarover; --- 417,421 ---- { t_object x_obj; ! t_float x_f; t_float x_g; } t_scalarover; *************** *** 445,455 **** t_int *over_perform(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) { ! float g = *in2++; *out++ = (g ? *in1++ / g : 0); } --- 445,455 ---- t_int *over_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) { ! t_sample g = *in2++; *out++ = (g ? *in1++ / g : 0); } *************** *** 459,473 **** t_int *over_perf8(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = (g0? f0 / g0 : 0); --- 459,473 ---- t_int *over_perf8(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = (g0? f0 / g0 : 0); *************** *** 485,491 **** t_int *scalarover_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); if(f) f = 1./f; --- 485,491 ---- t_int *scalarover_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); if(f) f = 1./f; *************** *** 496,508 **** t_int *scalarover_perf8(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float g = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); if (g) g = 1.f / g; for (; n; n -= 8, in += 8, out += 8) { ! float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 * g; out[1] = f1 * g; out[2] = f2 * g; out[3] = f3 * g; --- 496,508 ---- t_int *scalarover_perf8(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float g = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); if (g) g = 1.f / g; for (; n; n -= 8, in += 8, out += 8) { ! t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 * g; out[1] = f1 * g; out[2] = f2 * g; out[3] = f3 * g; *************** *** 553,557 **** { t_object x_obj; ! float x_f; } t_max;
--- 553,557 ---- { t_object x_obj; ! t_float x_f; } t_max;
*************** *** 559,563 **** { t_object x_obj; ! float x_f; t_float x_g; } t_scalarmax; --- 559,563 ---- { t_object x_obj; ! t_float x_f; t_float x_g; } t_scalarmax; *************** *** 587,597 **** t_int *max_perform(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) { ! float f = *in1++, g = *in2++; *out++ = (f > g ? f : g); } --- 587,597 ---- t_int *max_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) { ! t_sample f = *in1++, g = *in2++; *out++ = (f > g ? f : g); } *************** *** 601,615 **** t_int *max_perf8(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = (f0 > g0 ? f0 : g0); out[1] = (f1 > g1 ? f1 : g1); --- 601,615 ---- t_int *max_perf8(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = (f0 > g0 ? f0 : g0); out[1] = (f1 > g1 ? f1 : g1); *************** *** 623,633 **** t_int *scalarmax_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) { ! t_float g = *in++; *out++ = (f > g ? f : g); } --- 623,633 ---- t_int *scalarmax_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) { ! t_sample g = *in++; *out++ = (f > g ? f : g); } *************** *** 637,648 **** t_int *scalarmax_perf8(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float g = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = (f0 > g ? f0 : g); out[1] = (f1 > g ? f1 : g); --- 637,648 ---- t_int *scalarmax_perf8(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float g = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in += 8, out += 8) { ! t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = (f0 > g ? f0 : g); out[1] = (f1 > g ? f1 : g); *************** *** 695,699 **** { t_object x_obj; ! float x_f; } t_min;
--- 695,699 ---- { t_object x_obj; ! t_float x_f; } t_min;
*************** *** 702,706 **** t_object x_obj; t_float x_g; ! float x_f; } t_scalarmin;
--- 702,706 ---- t_object x_obj; t_float x_g; ! t_float x_f; } t_scalarmin;
*************** *** 729,739 **** t_int *min_perform(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) { ! float f = *in1++, g = *in2++; *out++ = (f < g ? f : g); } --- 729,739 ---- t_int *min_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) { ! t_sample f = *in1++, g = *in2++; *out++ = (f < g ? f : g); } *************** *** 743,757 **** t_int *min_perf8(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *in2 = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = (f0 < g0 ? f0 : g0); out[1] = (f1 < g1 ? f1 : g1); --- 743,757 ---- t_int *min_perf8(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) { ! t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; ! t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
! t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; ! t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = (f0 < g0 ? f0 : g0); out[1] = (f1 < g1 ? f1 : g1); *************** *** 765,775 **** t_int *scalarmin_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); while (n--) { ! t_float g = *in++; *out++ = (f < g ? f : g); } --- 765,775 ---- t_int *scalarmin_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float f = *(t_float *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) { ! t_sample g = *in++; *out++ = (f < g ? f : g); } *************** *** 779,783 **** t_int *scalarmin_perf8(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_float g = *(t_float *)(w[2]); t_float *out = (t_float *)(w[3]); --- 779,783 ---- t_int *scalarmin_perf8(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_float g = *(t_float *)(w[2]); t_float *out = (t_float *)(w[3]); *************** *** 785,790 **** for (; n; n -= 8, in += 8, out += 8) { ! float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = (f0 < g ? f0 : g); out[1] = (f1 < g ? f1 : g); --- 785,790 ---- for (; n; n -= 8, in += 8, out += 8) { ! t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; ! t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = (f0 < g ? f0 : g); out[1] = (f1 < g ? f1 : g);
Index: m_class.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_class.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** m_class.c 15 Aug 2006 04:54:15 -0000 1.7 --- m_class.c 28 Dec 2007 03:43:05 -0000 1.8 *************** *** 401,405 **** int offset = (*x)->c_floatsignalin; if (offset > 0) ! *(t_sample *)(((char *)x) + offset) = f; else pd_error(x, "%s: float unexpected for signal input", --- 401,405 ---- int offset = (*x)->c_floatsignalin; if (offset > 0) ! *(t_float *)(((char *)x) + offset) = f; else pd_error(x, "%s: float unexpected for signal input",
Index: g_vslider.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_vslider.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** g_vslider.c 8 Sep 2006 23:45:30 -0000 1.6 --- g_vslider.c 28 Dec 2007 03:43:04 -0000 1.7 *************** *** 60,67 **** xpos + x->x_gui.x_w, r, x->x_gui.x_fcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", --- 60,68 ---- xpos + x->x_gui.x_w, r, x->x_gui.x_fcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, ! x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", *************** *** 123,128 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); --- 124,129 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); *************** *** 215,219 **** (int)x->x_gui.x_obj.te_xpix, (int)x->x_gui.x_obj.te_ypix, gensym("vsl"), x->x_gui.x_w, x->x_gui.x_h, ! (float)x->x_min, (float)x->x_max, x->x_lin0_log1, iem_symargstoint(&x->x_gui.x_isa), srl[0], srl[1], srl[2], --- 216,220 ---- (int)x->x_gui.x_obj.te_xpix, (int)x->x_gui.x_obj.te_ypix, gensym("vsl"), x->x_gui.x_w, x->x_gui.x_h, ! (t_float)x->x_min, (t_float)x->x_max, x->x_lin0_log1, iem_symargstoint(&x->x_gui.x_isa), srl[0], srl[1], srl[2], *************** *** 278,282 **** iemgui_properties(&x->x_gui, srl);
! sprintf(buf, "pdtk_iemgui_dialog %%s VSLIDER \ --------dimensions(pix)(pix):-------- %d %d width: %d %d height: \ -----------output-range:----------- %g bottom: %g top: %d \ --- 279,283 ---- iemgui_properties(&x->x_gui, srl);
! sprintf(buf, "pdtk_iemgui_dialog %%s |vsl| \ --------dimensions(pix)(pix):-------- %d %d width: %d %d height: \ -----------output-range:----------- %g bottom: %g top: %d \ *************** *** 563,567 **** else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, "courier"); } if(x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv); x->x_gui.x_ldx = ldx; --- 564,568 ---- else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, sys_font); } if(x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv); x->x_gui.x_ldx = ldx;
Index: g_readwrite.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_readwrite.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** g_readwrite.c 22 Oct 2006 21:46:11 -0000 1.8 --- g_readwrite.c 28 Dec 2007 03:43:04 -0000 1.9 *************** *** 620,632 **** x->gl_x1, x->gl_y1, x->gl_x2, x->gl_y2, ! (float)x->gl_pixwidth, (float)x->gl_pixheight, ! (float)((x->gl_hidetext)?2.:1.), ! (float)x->gl_xmargin, (float)x->gl_ymargin); /* otherwise write in 0.38-compatible form */ else binbuf_addv(b, "ssfffffff;", gensym("#X"), gensym("coords"), x->gl_x1, x->gl_y1, x->gl_x2, x->gl_y2, ! (float)x->gl_pixwidth, (float)x->gl_pixheight, ! (float)x->gl_isgraph); } } --- 620,632 ---- x->gl_x1, x->gl_y1, x->gl_x2, x->gl_y2, ! (t_float)x->gl_pixwidth, (t_float)x->gl_pixheight, ! (t_float)((x->gl_hidetext)?2.:1.), ! (t_float)x->gl_xmargin, (t_float)x->gl_ymargin); /* otherwise write in 0.38-compatible form */ else binbuf_addv(b, "ssfffffff;", gensym("#X"), gensym("coords"), x->gl_x1, x->gl_y1, x->gl_x2, x->gl_y2, ! (t_float)x->gl_pixwidth, (t_float)x->gl_pixheight, ! (t_float)x->gl_isgraph); } }
Index: x_list.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_list.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** x_list.c 20 Jul 2007 03:25:21 -0000 1.6 --- x_list.c 28 Dec 2007 03:43:06 -0000 1.7 *************** *** 485,489 **** int argc, t_atom *argv) { ! outlet_float(x->x_obj.ob_outlet, (float)argc); }
--- 485,489 ---- int argc, t_atom *argv) { ! outlet_float(x->x_obj.ob_outlet, (t_float)argc); }
*************** *** 491,495 **** int argc, t_atom *argv) { ! outlet_float(x->x_obj.ob_outlet, (float)argc+1); }
--- 491,495 ---- int argc, t_atom *argv) { ! outlet_float(x->x_obj.ob_outlet, (t_float)argc+1); }
Index: g_toggle.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_toggle.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** g_toggle.c 8 Sep 2006 23:45:30 -0000 1.5 --- g_toggle.c 28 Dec 2007 03:43:04 -0000 1.6 *************** *** 62,70 **** (x->x_on!=0.0)?x->x_gui.x_fcol:x->x_gui.x_bcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxLABEL\n", canvas, xx+x->x_gui.x_ldx, yy+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", --- 62,71 ---- (x->x_on!=0.0)?x->x_gui.x_fcol:x->x_gui.x_bcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxLABEL\n", canvas, xx+x->x_gui.x_ldx, yy+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, ! x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", *************** *** 121,126 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); --- 122,127 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); *************** *** 226,230 ****
iemgui_properties(&x->x_gui, srl); ! sprintf(buf, "pdtk_iemgui_dialog %%s TOGGLE \ ----------dimensions(pix):----------- %d %d size: 0 0 empty \ -----------non-zero-value:----------- %g value: 0.0 empty %g \ --- 227,231 ----
iemgui_properties(&x->x_gui, srl); ! sprintf(buf, "pdtk_iemgui_dialog %%s |tgl| \ ----------dimensions(pix):----------- %d %d size: 0 0 empty \ -----------non-zero-value:----------- %g value: 0.0 empty %g \ *************** *** 257,261 **** t_symbol *srl[3]; int a = (int)atom_getintarg(0, argc, argv); ! float nonzero = (float)atom_getfloatarg(2, argc, argv); int sr_flags;
--- 258,262 ---- t_symbol *srl[3]; int a = (int)atom_getintarg(0, argc, argv); ! t_float nonzero = (t_float)atom_getfloatarg(2, argc, argv); int sr_flags;
*************** *** 314,318 **** { if(!sys_noloadbang && x->x_gui.x_isa.x_loadinit) ! toggle_fout(x, (float)x->x_on); }
--- 315,319 ---- { if(!sys_noloadbang && x->x_gui.x_isa.x_loadinit) ! toggle_fout(x, (t_float)x->x_on); }
*************** *** 366,370 **** int ldx=17, ldy=7; int fs=10; ! float on=0.0, nonzero=1.0; char str[144];
--- 367,371 ---- int ldx=17, ldy=7; int fs=10; ! t_float on=0.0, nonzero=1.0; char str[144];
*************** *** 391,399 **** bflcol[1] = (int)atom_getintarg(10, argc, argv); bflcol[2] = (int)atom_getintarg(11, argc, argv); ! on = (float)atom_getfloatarg(12, argc, argv); } else iemgui_new_getnames(&x->x_gui, 2, 0); if((argc == 14)&&IS_A_FLOAT(argv,13)) ! nonzero = (float)atom_getfloatarg(13, argc, argv); x->x_gui.x_draw = (t_iemfunptr)toggle_draw;
--- 392,400 ---- bflcol[1] = (int)atom_getintarg(10, argc, argv); bflcol[2] = (int)atom_getintarg(11, argc, argv); ! on = (t_float)atom_getfloatarg(12, argc, argv); } else iemgui_new_getnames(&x->x_gui, 2, 0); if((argc == 14)&&IS_A_FLOAT(argv,13)) ! nonzero = (t_float)atom_getfloatarg(13, argc, argv); x->x_gui.x_draw = (t_iemfunptr)toggle_draw;
*************** *** 408,412 **** else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, "courier"); } x->x_nonzero = (nonzero!=0.0)?nonzero:1.0; if(x->x_gui.x_isa.x_loadinit) --- 409,413 ---- else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, sys_font); } x->x_nonzero = (nonzero!=0.0)?nonzero:1.0; if(x->x_gui.x_isa.x_loadinit)
Index: s_print.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_print.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** s_print.c 18 May 2005 04:28:51 -0000 1.3 --- s_print.c 28 Dec 2007 03:43:06 -0000 1.4 *************** *** 78,88 **** for (i = 0; i < argc; i++) { ! char buf[80]; ! atom_string(argv+i, buf, 80); poststring(buf); } }
! void postfloat(float f) { char buf[80]; --- 78,88 ---- for (i = 0; i < argc; i++) { ! char buf[MAXPDSTRING]; ! atom_string(argv+i, buf, MAXPDSTRING); poststring(buf); } }
! void postfloat(t_float f) { char buf[80]; *************** *** 119,123 **** if(level>sys_verbose)return; dopost("verbose("); ! postfloat((float)level); dopost("):");
--- 119,123 ---- if(level>sys_verbose)return; dopost("verbose("); ! postfloat((t_float)level); dopost("):");
Index: d_array.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_array.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** d_array.c 20 Jan 2007 04:06:06 -0000 1.9 --- d_array.c 28 Dec 2007 03:43:02 -0000 1.10 *************** *** 21,25 **** t_word *x_vec; t_symbol *x_arrayname; ! float x_f; } t_tabwrite_tilde;
--- 21,25 ---- t_word *x_vec; t_symbol *x_arrayname; ! t_float x_f; } t_tabwrite_tilde;
*************** *** 46,50 **** { t_tabwrite_tilde *x = (t_tabwrite_tilde *)(w[1]); ! t_float *in = (t_float *)(w[2]); int n = (int)(w[3]), phase = x->x_phase, endphase = x->x_nsampsintab; if (!x->x_vec) goto bad; --- 46,50 ---- { t_tabwrite_tilde *x = (t_tabwrite_tilde *)(w[1]); ! t_sample *in = (t_sample *)(w[2]); int n = (int)(w[3]), phase = x->x_phase, endphase = x->x_nsampsintab; if (!x->x_vec) goto bad; *************** *** 58,62 **** while (nxfer--) { ! float f = *in++; if (PD_BIGORSMALL(f)) f = 0; --- 58,62 ---- while (nxfer--) { ! t_sample f = *in++; if (PD_BIGORSMALL(f)) f = 0; *************** *** 169,173 **** { t_tabplay_tilde *x = (t_tabplay_tilde *)(w[1]); ! t_float *out = (t_float *)(w[2]); t_word *wp; int n = (int)(w[3]), phase = x->x_phase, --- 169,173 ---- { t_tabplay_tilde *x = (t_tabplay_tilde *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); t_word *wp; int n = (int)(w[3]), phase = x->x_phase, *************** *** 277,281 **** t_word *x_vec; t_symbol *x_arrayname; ! float x_f; } t_tabread_tilde;
--- 277,281 ---- t_word *x_vec; t_symbol *x_arrayname; ! t_float x_f; } t_tabread_tilde;
*************** *** 293,298 **** { t_tabread_tilde *x = (t_tabread_tilde *)(w[1]); ! t_float *in = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); int maxindex; --- 293,298 ---- { t_tabread_tilde *x = (t_tabread_tilde *)(w[1]); ! t_sample *in = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); int maxindex; *************** *** 373,377 **** t_word *x_vec; t_symbol *x_arrayname; ! float x_f; } t_tabread4_tilde;
--- 373,377 ---- t_word *x_vec; t_symbol *x_arrayname; ! t_float x_f; } t_tabread4_tilde;
*************** *** 389,394 **** { t_tabread4_tilde *x = (t_tabread4_tilde *)(w[1]); ! t_float *in = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); int maxindex; --- 389,394 ---- { t_tabread4_tilde *x = (t_tabread4_tilde *)(w[1]); ! t_sample *in = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); int maxindex; *************** *** 403,407 **** for (i = 0, xmax = 0, xmin = maxindex, fp = in1; i < n; i++, fp++) { ! float f = *in1; if (f < xmin) xmin = f; else if (f > xmax) xmax = f; --- 403,407 ---- for (i = 0, xmax = 0, xmin = maxindex, fp = in1; i < n; i++, fp++) { ! t_sample f = *in1; if (f < xmin) xmin = f; else if (f > xmax) xmax = f; *************** *** 411,415 **** fp = in1; i < n; i++, fp++) { ! float f = *in1; if (f > splitlo && f < splithi) goto zero; } --- 411,415 ---- fp = in1; i < n; i++, fp++) { ! t_sample f = *in1; if (f > splitlo && f < splithi) goto zero; } *************** *** 418,424 **** for (i = 0; i < n; i++) { ! float findex = *in++; int index = findex; ! float frac, a, b, c, d, cminusb; static int count; if (index < 1) --- 418,424 ---- for (i = 0; i < n; i++) { ! t_sample findex = *in++; int index = findex; ! t_sample frac, a, b, c, d, cminusb; static int count; if (index < 1) *************** *** 548,558 **** { t_object x_obj; ! float x_fnpoints; ! float x_finvnpoints; t_word *x_vec; t_symbol *x_arrayname; ! float x_f; double x_phase; ! float x_conv; } t_tabosc4_tilde;
--- 548,558 ---- { t_object x_obj; ! t_float x_fnpoints; ! t_float x_finvnpoints; t_word *x_vec; t_symbol *x_arrayname; ! t_float x_f; double x_phase; ! t_float x_conv; } t_tabosc4_tilde;
*************** *** 573,584 **** { t_tabosc4_tilde *x = (t_tabosc4_tilde *)(w[1]); ! t_float *in = (t_float *)(w[2]); ! t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); int normhipart; union tabfudge tf; ! float fnpoints = x->x_fnpoints; int mask = fnpoints - 1; ! float conv = fnpoints * x->x_conv; int maxindex; t_word *tab = x->x_vec, *addr; --- 573,584 ---- { t_tabosc4_tilde *x = (t_tabosc4_tilde *)(w[1]); ! t_sample *in = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); int normhipart; union tabfudge tf; ! t_float fnpoints = x->x_fnpoints; int mask = fnpoints - 1; ! t_float conv = fnpoints * x->x_conv; int maxindex; t_word *tab = x->x_vec, *addr; *************** *** 593,597 **** while (n--) { ! float frac, a, b, c, d, cminusb; tf.tf_d = dphase; dphase += *in++ * conv; --- 593,597 ---- while (n--) { ! t_sample frac, a, b, c, d, cminusb; tf.tf_d = dphase; dphase += *in++ * conv; *************** *** 695,699 **** int x_graphcount; t_symbol *x_arrayname; ! float x_f; } t_tabsend;
--- 695,699 ---- int x_graphcount; t_symbol *x_arrayname; ! t_float x_f; } t_tabsend;
*************** *** 712,716 **** { t_tabsend *x = (t_tabsend *)(w[1]); ! t_float *in = (t_float *)(w[2]); int n = w[3]; t_word *dest = x->x_vec; --- 712,716 ---- { t_tabsend *x = (t_tabsend *)(w[1]); ! t_sample *in = (t_sample *)(w[2]); int n = w[3]; t_word *dest = x->x_vec; *************** *** 720,724 **** while (n--) { ! float f = *in++; if (PD_BIGORSMALL(f)) f = 0; --- 720,724 ---- while (n--) { ! t_sample f = *in++; if (PD_BIGORSMALL(f)) f = 0; *************** *** 786,790 **** { t_tabreceive *x = (t_tabreceive *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = w[3]; t_word *from = x->x_vec; --- 786,790 ---- { t_tabreceive *x = (t_tabreceive *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = w[3]; t_word *from = x->x_vec; *************** *** 965,969 **** t_object x_obj; t_symbol *x_arrayname; ! float x_ft1; } t_tabwrite;
--- 965,969 ---- t_object x_obj; t_symbol *x_arrayname; ! t_float x_ft1; } t_tabwrite;
Index: m_glob.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_glob.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** m_glob.c 19 Aug 2005 23:28:03 -0000 1.6 --- m_glob.c 28 Dec 2007 03:43:05 -0000 1.7 *************** *** 50,53 **** --- 50,59 ---- #endif
+ static void glob_version(t_pd *dummy, float f) + { + if (f > 0) + error("file format newer than this version of Pd (trying anyway...)"); + } + void max_default(t_pd *x, t_symbol *s, int argc, t_atom *argv) { *************** *** 114,117 **** --- 120,125 ---- class_addmethod(glob_pdobject, (t_method)glob_savepreferences, gensym("save-preferences"), 0); + class_addmethod(glob_pdobject, (t_method)glob_version, + gensym("version"), A_FLOAT, 0); #ifdef UNIX class_addmethod(glob_pdobject, (t_method)glob_watchdog,
Index: g_traversal.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_traversal.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** g_traversal.c 9 Oct 2006 04:36:12 -0000 1.7 --- g_traversal.c 28 Dec 2007 03:43:04 -0000 1.8 *************** *** 207,211 **** }
! static void ptrobj_vnext(t_ptrobj *x, float f) { t_gobj *gobj; --- 207,211 ---- }
! static void ptrobj_vnext(t_ptrobj *x, t_float f) { t_gobj *gobj; *************** *** 775,779 ****
array = *(t_array **)(((char *)w) + onset); ! outlet_float(x->x_obj.ob_outlet, (float)(array->a_n)); }
--- 775,779 ----
array = *(t_array **)(((char *)w) + onset); ! outlet_float(x->x_obj.ob_outlet, (t_float)(array->a_n)); }
Index: d_fft_mayer.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_fft_mayer.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** d_fft_mayer.c 3 Jun 2006 18:22:09 -0000 1.1 --- d_fft_mayer.c 28 Dec 2007 03:43:03 -0000 1.2 *************** *** 59,63 **** #include "m_pd.h"
! #define REAL float #define GOOD_TRIG
--- 59,63 ---- #include "m_pd.h"
! #define REAL t_sample #define GOOD_TRIG
Index: g_hdial.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_hdial.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** g_hdial.c 8 Sep 2006 23:45:30 -0000 1.7 --- g_hdial.c 28 Dec 2007 03:43:04 -0000 1.8 *************** *** 74,81 **** } sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxLABEL\n", canvas, xx11b+x->x_gui.x_ldx, yy11+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) --- 74,81 ---- } sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxLABEL\n", canvas, xx11b+x->x_gui.x_ldx, yy11+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) *************** *** 142,147 **** int n=x->x_number, i;
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); --- 142,147 ---- int n=x->x_number, i;
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); *************** *** 265,269 **** if (pd_class(&x->x_gui.x_obj.ob_pd) == hradio_old_class) hchange = x->x_change; ! sprintf(buf, "pdtk_iemgui_dialog %%s hradio \ ----------dimensions(pix):----------- %d %d size: 0 0 empty \ empty 0.0 empty 0.0 empty %d \ --- 265,269 ---- if (pd_class(&x->x_gui.x_obj.ob_pd) == hradio_old_class) hchange = x->x_change; ! sprintf(buf, "pdtk_iemgui_dialog %%s |hradio| \ ----------dimensions(pix):----------- %d %d size: 0 0 empty \ empty 0.0 empty 0.0 empty %d \ *************** *** 348,352 **** if((x->x_change)&&(x->x_on != x->x_on_old)) { ! SETFLOAT(x->x_at, (float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 348,352 ---- if((x->x_change)&&(x->x_on != x->x_on_old)) { ! SETFLOAT(x->x_at, (t_float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 355,359 **** } x->x_on_old = x->x_on; ! SETFLOAT(x->x_at, (float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 355,359 ---- } x->x_on_old = x->x_on; ! SETFLOAT(x->x_at, (t_float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 382,386 **** if((x->x_change)&&(i != x->x_on_old)) { ! SETFLOAT(x->x_at, (float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 382,386 ---- if((x->x_change)&&(i != x->x_on_old)) { ! SETFLOAT(x->x_at, (t_float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 393,397 **** (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE); x->x_on_old = x->x_on; ! SETFLOAT(x->x_at, (float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 393,397 ---- (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE); x->x_on_old = x->x_on; ! SETFLOAT(x->x_at, (t_float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 426,430 **** if(x->x_gui.x_fsf.x_put_in2out) { ! SETFLOAT(x->x_at, (float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 426,430 ---- if(x->x_gui.x_fsf.x_put_in2out) { ! SETFLOAT(x->x_at, (t_float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 440,444 **** if(x->x_gui.x_fsf.x_put_in2out) { ! SETFLOAT(x->x_at, (float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 440,444 ---- if(x->x_gui.x_fsf.x_put_in2out) { ! SETFLOAT(x->x_at, (t_float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 465,469 **** int xx = (int)xpos - (int)text_xpix(&x->x_gui.x_obj, x->x_gui.x_glist);
! hradio_fout(x, (float)(xx / x->x_gui.x_w)); }
--- 465,469 ---- int xx = (int)xpos - (int)text_xpix(&x->x_gui.x_obj, x->x_gui.x_glist);
! hradio_fout(x, (t_float)(xx / x->x_gui.x_w)); }
*************** *** 590,594 **** else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, "courier"); } if(num < 1) num = 1; --- 590,594 ---- else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, sys_font); } if(num < 1) num = 1;
Index: g_canvas.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_canvas.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** g_canvas.h 9 Oct 2006 04:36:12 -0000 1.14 --- g_canvas.h 28 Dec 2007 03:43:04 -0000 1.15 *************** *** 132,137 **** typedef struct _tick /* where to put ticks on x or y axes */ { ! float k_point; /* one point to draw a big tick at */ ! float k_inc; /* x or y increment per little tick */ int k_lperb; /* little ticks per big; 0 if no ticks to draw */ } t_tick; --- 132,137 ---- typedef struct _tick /* where to put ticks on x or y axes */ { ! t_float k_point; /* one point to draw a big tick at */ ! t_float k_inc; /* x or y increment per little tick */ int k_lperb; /* little ticks per big; 0 if no ticks to draw */ } t_tick; *************** *** 151,158 **** int gl_pixwidth; /* width in pixels (on parent, if a graph) */ int gl_pixheight; ! float gl_x1; /* bounding rectangle in our own coordinates */ ! float gl_y1; ! float gl_x2; ! float gl_y2; int gl_screenx1; /* screen coordinates when toplevel */ int gl_screeny1; --- 151,158 ---- int gl_pixwidth; /* width in pixels (on parent, if a graph) */ int gl_pixheight; ! t_float gl_x1; /* bounding rectangle in our own coordinates */ ! t_float gl_y1; ! t_float gl_x2; ! t_float gl_y2; int gl_screenx1; /* screen coordinates when toplevel */ int gl_screeny1; *************** *** 164,172 **** int gl_nxlabels; /* number of X coordinate labels */ t_symbol **gl_xlabel; /* ... an array to hold them */ ! float gl_xlabely; /* ... and their Y coordinates */ t_tick gl_ytick; /* same as above for Y ticks and labels */ int gl_nylabels; t_symbol **gl_ylabel; ! float gl_ylabelx; t_editor *gl_editor; /* editor structure when visible */ t_symbol *gl_name; /* symbol bound here */ --- 164,172 ---- int gl_nxlabels; /* number of X coordinate labels */ t_symbol **gl_xlabel; /* ... an array to hold them */ ! t_float gl_xlabely; /* ... and their Y coordinates */ t_tick gl_ytick; /* same as above for Y ticks and labels */ int gl_nylabels; t_symbol **gl_ylabel; ! t_float gl_ylabelx; t_editor *gl_editor; /* editor structure when visible */ t_symbol *gl_name; /* symbol bound here */ *************** *** 287,312 **** /* bounding rectangle: */ typedef void (*t_parentgetrectfn)(t_gobj *x, struct _glist *glist, ! t_word *data, t_template *tmpl, float basex, float basey, int *x1, int *y1, int *x2, int *y2); /* displace it */ typedef void (*t_parentdisplacefn)(t_gobj *x, struct _glist *glist, ! t_word *data, t_template *tmpl, float basex, float basey, int dx, int dy); /* change color to show selection */ typedef void (*t_parentselectfn)(t_gobj *x, struct _glist *glist, ! t_word *data, t_template *tmpl, float basex, float basey, int state); /* change appearance to show activation/deactivation: */ typedef void (*t_parentactivatefn)(t_gobj *x, struct _glist *glist, ! t_word *data, t_template *tmpl, float basex, float basey, int state); /* making visible or invisible */ typedef void (*t_parentvisfn)(t_gobj *x, struct _glist *glist, ! t_word *data, t_template *tmpl, float basex, float basey, int flag); /* field a mouse click */ typedef int (*t_parentclickfn)(t_gobj *x, struct _glist *glist, t_word *data, t_template *tmpl, t_scalar *sc, t_array *ap, ! float basex, float basey, int xpix, int ypix, int shift, int alt, int dbl, int doit);
--- 287,312 ---- /* bounding rectangle: */ typedef void (*t_parentgetrectfn)(t_gobj *x, struct _glist *glist, ! t_word *data, t_template *tmpl, t_float basex, t_float basey, int *x1, int *y1, int *x2, int *y2); /* displace it */ typedef void (*t_parentdisplacefn)(t_gobj *x, struct _glist *glist, ! t_word *data, t_template *tmpl, t_float basex, t_float basey, int dx, int dy); /* change color to show selection */ typedef void (*t_parentselectfn)(t_gobj *x, struct _glist *glist, ! t_word *data, t_template *tmpl, t_float basex, t_float basey, int state); /* change appearance to show activation/deactivation: */ typedef void (*t_parentactivatefn)(t_gobj *x, struct _glist *glist, ! t_word *data, t_template *tmpl, t_float basex, t_float basey, int state); /* making visible or invisible */ typedef void (*t_parentvisfn)(t_gobj *x, struct _glist *glist, ! t_word *data, t_template *tmpl, t_float basex, t_float basey, int flag); /* field a mouse click */ typedef int (*t_parentclickfn)(t_gobj *x, struct _glist *glist, t_word *data, t_template *tmpl, t_scalar *sc, t_array *ap, ! t_float basex, t_float basey, int xpix, int ypix, int shift, int alt, int dbl, int doit);
*************** *** 381,396 **** EXTERN void glist_mergefile(t_glist *x, t_symbol *filename, t_symbol *format);
! EXTERN float glist_pixelstox(t_glist *x, float xpix); ! EXTERN float glist_pixelstoy(t_glist *x, float ypix); ! EXTERN float glist_xtopixels(t_glist *x, float xval); ! EXTERN float glist_ytopixels(t_glist *x, float yval); ! EXTERN float glist_dpixtodx(t_glist *x, float dxpix); ! EXTERN float glist_dpixtody(t_glist *x, float dypix);
EXTERN void glist_getnextxy(t_glist *gl, int *xval, int *yval); EXTERN void glist_glist(t_glist *g, t_symbol *s, int argc, t_atom *argv); EXTERN t_glist *glist_addglist(t_glist *g, t_symbol *sym, ! float x1, float y1, float x2, float y2, ! float px1, float py1, float px2, float py2); EXTERN void glist_arraydialog(t_glist *parent, t_symbol *name, t_floatarg size, t_floatarg saveit, t_floatarg newgraph); --- 381,396 ---- EXTERN void glist_mergefile(t_glist *x, t_symbol *filename, t_symbol *format);
! EXTERN t_float glist_pixelstox(t_glist *x, t_float xpix); ! EXTERN t_float glist_pixelstoy(t_glist *x, t_float ypix); ! EXTERN t_float glist_xtopixels(t_glist *x, t_float xval); ! EXTERN t_float glist_ytopixels(t_glist *x, t_float yval); ! EXTERN t_float glist_dpixtodx(t_glist *x, t_float dxpix); ! EXTERN t_float glist_dpixtody(t_glist *x, t_float dypix);
EXTERN void glist_getnextxy(t_glist *gl, int *xval, int *yval); EXTERN void glist_glist(t_glist *g, t_symbol *s, int argc, t_atom *argv); EXTERN t_glist *glist_addglist(t_glist *g, t_symbol *sym, ! t_float x1, t_float y1, t_float x2, t_float y2, ! t_float px1, t_float py1, t_float px2, t_float py2); EXTERN void glist_arraydialog(t_glist *parent, t_symbol *name, t_floatarg size, t_floatarg saveit, t_floatarg newgraph); *************** *** 503,507 **** t_floatarg fwhoout, t_floatarg foutno,t_floatarg fwhoin, t_floatarg finno); EXTERN void canvas_disconnect(t_canvas *x, ! float index1, float outno, float index2, float inno); EXTERN int canvas_isconnected (t_canvas *x, t_text *ob1, int n1, t_text *ob2, int n2); --- 503,507 ---- t_floatarg fwhoout, t_floatarg foutno,t_floatarg fwhoin, t_floatarg finno); EXTERN void canvas_disconnect(t_canvas *x, ! t_float index1, t_float outno, t_float index2, t_float inno); EXTERN int canvas_isconnected (t_canvas *x, t_text *ob1, int n1, t_text *ob2, int n2); *************** *** 546,550 **** t_symbol *templatesym); EXTERN void word_free(t_word *wp, t_template *tmpl); ! EXTERN void scalar_getbasexy(t_scalar *x, float *basex, float *basey); EXTERN void scalar_redraw(t_scalar *x, t_glist *glist);
--- 546,550 ---- t_symbol *templatesym); EXTERN void word_free(t_word *wp, t_template *tmpl); ! EXTERN void scalar_getbasexy(t_scalar *x, t_float *basex, t_float *basey); EXTERN void scalar_redraw(t_scalar *x, t_glist *glist);
*************** *** 552,556 **** EXTERN int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap, t_symbol *elemtemplatesym, ! float linewidth, float xloc, float xinc, float yloc, float scalarvis, t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield, int xpix, int ypix, int shift, int alt, int dbl, int doit); --- 552,556 ---- EXTERN int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap, t_symbol *elemtemplatesym, ! t_float linewidth, t_float xloc, t_float xinc, t_float yloc, t_float scalarvis, t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield, int xpix, int ypix, int shift, int alt, int dbl, int doit); *************** *** 558,564 **** EXTERN void array_getcoordinate(t_glist *glist, char *elem, int xonset, int yonset, int wonset, int indx, ! float basex, float basey, float xinc, t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc, ! float *xp, float *yp, float *wp);
EXTERN int array_getfields(t_symbol *elemtemplatesym, --- 558,564 ---- EXTERN void array_getcoordinate(t_glist *glist, char *elem, int xonset, int yonset, int wonset, int indx, ! t_float basex, t_float basey, t_float xinc, t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc, ! t_float *xp, t_float *yp, t_float *wp);
EXTERN int array_getfields(t_symbol *elemtemplatesym, *************** *** 600,606 **** t_word *wp, int loud); EXTERN void fielddesc_setcoord(t_fielddesc *f, t_template *tmpl, ! t_word *wp, float pix, int loud); ! EXTERN t_float fielddesc_cvttocoord(t_fielddesc *f, float val); ! EXTERN float fielddesc_cvtfromcoord(t_fielddesc *f, float coord);
--- 600,606 ---- t_word *wp, int loud); EXTERN void fielddesc_setcoord(t_fielddesc *f, t_template *tmpl, ! t_word *wp, t_float pix, int loud); ! EXTERN t_float fielddesc_cvttocoord(t_fielddesc *f, t_float val); ! EXTERN t_float fielddesc_cvtfromcoord(t_fielddesc *f, t_float coord);
Index: g_vumeter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_vumeter.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** g_vumeter.c 16 Aug 2005 04:06:28 -0000 1.5 --- g_vumeter.c 28 Dec 2007 03:43:04 -0000 1.6 *************** *** 117,123 **** if(((i+2)&3) && (x->x_scale)) sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxSCALE%d\n", ! canvas, end, yyy+k3, iemgui_vu_scale_str[i], x->x_gui.x_font, x->x_gui.x_fontsize, ! x->x_gui.x_lcol, x, i); } if(x->x_scale) --- 117,124 ---- if(((i+2)&3) && (x->x_scale)) sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxSCALE%d\n", ! canvas, end, yyy+k3, iemgui_vu_scale_str[i], ! x->x_gui.x_font, x->x_gui.x_fontsize, ! sys_fontweight, x->x_gui.x_lcol, x, i); } if(x->x_scale) *************** *** 126,131 **** yyy = k4 + k1*(k2-i); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxSCALE%d\n", ! canvas, end, yyy+k3, iemgui_vu_scale_str[i], x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x, i); } --- 127,133 ---- yyy = k4 + k1*(k2-i); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxSCALE%d\n", ! canvas, end, yyy+k3, iemgui_vu_scale_str[i], x->x_gui.x_font, ! x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_lcol, x, i); } *************** *** 137,144 **** mid, ypos+10, x->x_led_size, x->x_gui.x_bcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) { --- 139,147 ---- mid, ypos+10, x->x_led_size, x->x_gui.x_bcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, ! x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) { *************** *** 275,280 **** x->x_led_size); if(((i+2)&3) && (x->x_scale)) ! sys_vgui(".x%lx.c itemconfigure %lxSCALE%d -text {%s} -font {%s %d bold} -fill #%6.6x\n", ! canvas, x, i, iemgui_vu_scale_str[i], x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol); } --- 278,284 ---- x->x_led_size); if(((i+2)&3) && (x->x_scale)) ! sys_vgui(".x%lx.c itemconfigure %lxSCALE%d -text {%s} -font {{%s} -%d %s} -fill #%6.6x\n", ! canvas, x, i, iemgui_vu_scale_str[i], x->x_gui.x_font, ! x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol); } *************** *** 282,291 **** { i=IEM_VU_STEPS+1; ! sys_vgui(".x%lx.c itemconfigure %lxSCALE%d -text {%s} -font {%s %d bold} -fill #%6.6x\n", ! canvas, x, i, iemgui_vu_scale_str[i], x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol); } ! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); --- 286,296 ---- { i=IEM_VU_STEPS+1; ! sys_vgui(".x%lx.c itemconfigure %lxSCALE%d -text {%s} -font {{%s} -%d %s} -fill #%6.6x\n", ! canvas, x, i, iemgui_vu_scale_str[i], x->x_gui.x_font, ! x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol); } ! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); *************** *** 477,490 **** if((i+2)&3) sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxSCALE%d\n", ! canvas, end, yyy+k3, iemgui_vu_scale_str[i], x->x_gui.x_font, x->x_gui.x_fontsize, ! x->x_gui.x_lcol, x, i); } i=IEM_VU_STEPS+1; yyy = k4 + k1*(k2-i); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxSCALE%d\n", ! canvas, end, yyy+k3, iemgui_vu_scale_str[i], x->x_gui.x_font, x->x_gui.x_fontsize, ! x->x_gui.x_lcol, x, i); } } --- 482,497 ---- if((i+2)&3) sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxSCALE%d\n", ! canvas, end, yyy+k3, iemgui_vu_scale_str[i], ! x->x_gui.x_font, x->x_gui.x_fontsize, ! sys_fontweight, x->x_gui.x_lcol, x, i); } i=IEM_VU_STEPS+1; yyy = k4 + k1*(k2-i); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxSCALE%d\n", ! canvas, end, yyy+k3, iemgui_vu_scale_str[i], ! x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, ! sys_fontweight, x->x_gui.x_lcol, x, i); } } *************** *** 498,502 ****
iemgui_properties(&x->x_gui, srl); ! sprintf(buf, "pdtk_iemgui_dialog %%s VU-METER \ --------dimensions(pix)(pix):-------- %d %d width: %d %d height: \ empty 0.0 empty 0.0 empty %d \ --- 505,509 ----
iemgui_properties(&x->x_gui, srl); ! sprintf(buf, "pdtk_iemgui_dialog %%s |vu| \ --------dimensions(pix)(pix):-------- %d %d width: %d %d height: \ empty 0.0 empty 0.0 empty %d \ *************** *** 532,536 **** if(scale != 0) scale = 1; ! vu_scale(x, (float)scale); (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_CONFIG); (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_IO + sr_flags); --- 539,543 ---- if(scale != 0) scale = 1; ! vu_scale(x, (t_float)scale); (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_CONFIG); (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_IO + sr_flags); *************** *** 587,591 **** } i = (int)(100.0*rms + 10000.5); ! rms = 0.01*(float)(i - 10000); x->x_fr = rms; outlet_float(x->x_out_rms, rms); --- 594,598 ---- } i = (int)(100.0*rms + 10000.5); ! rms = 0.01*(t_float)(i - 10000); x->x_fr = rms; outlet_float(x->x_out_rms, rms); *************** *** 608,612 **** } i = (int)(100.0*peak + 10000.5); ! peak = 0.01*(float)(i - 10000); x->x_fp = peak; x->x_updatepeak = 1; --- 615,619 ---- } i = (int)(100.0*peak + 10000.5); ! peak = 0.01*(t_float)(i - 10000); x->x_fp = peak; x->x_updatepeak = 1; *************** *** 628,632 **** int bflcol[]={-66577, -1, -1}; int w=IEM_GUI_DEFAULTSIZE, h=IEM_VU_STEPS*IEM_VU_DEFAULTSIZE; ! int ldx=-1, ldy=-8, f=0, fs=8, scale=1; int ftbreak=IEM_BNG_DEFAULTBREAKFLASHTIME, fthold=IEM_BNG_DEFAULTHOLDFLASHTIME; char str[144]; --- 635,639 ---- int bflcol[]={-66577, -1, -1}; int w=IEM_GUI_DEFAULTSIZE, h=IEM_VU_STEPS*IEM_VU_DEFAULTSIZE; ! int ldx=-1, ldy=-8, f=0, fs=10, scale=1; int ftbreak=IEM_BNG_DEFAULTBREAKFLASHTIME, fthold=IEM_BNG_DEFAULTHOLDFLASHTIME; char str[144]; *************** *** 668,672 **** strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, "courier"); } if(x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv); --- 675,679 ---- strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, sys_font); } if(x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
Index: g_all_guis.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_all_guis.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** g_all_guis.c 11 Aug 2006 20:09:07 -0000 1.9 --- g_all_guis.c 28 Dec 2007 03:43:03 -0000 1.10 *************** *** 439,443 **** { f = 0; ! strcpy(iemgui->x_font, "courier"); } iemgui->x_fsf.x_font_style = f; --- 439,443 ---- { f = 0; ! strcpy(iemgui->x_font, sys_font); } iemgui->x_fsf.x_font_style = f; *************** *** 447,452 **** iemgui->x_fontsize = f; if(glist_isvisible(iemgui->x_glist)) ! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold}\n", ! glist_getcanvas(iemgui->x_glist), x, iemgui->x_font, iemgui->x_fontsize); }
--- 447,453 ---- iemgui->x_fontsize = f; if(glist_isvisible(iemgui->x_glist)) ! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s}\n", ! glist_getcanvas(iemgui->x_glist), x, iemgui->x_font, ! iemgui->x_fontsize, sys_fontweight); }
*************** *** 623,627 **** { f = 0; ! strcpy(iemgui->x_font, "courier"); } iemgui->x_fsf.x_font_style = f; --- 624,628 ---- { f = 0; ! strcpy(iemgui->x_font, sys_font); } iemgui->x_fsf.x_font_style = f;
Index: makefile.in =================================================================== RCS file: /cvsroot/pure-data/pd/src/makefile.in,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** makefile.in 2 Aug 2007 00:33:50 -0000 1.17 --- makefile.in 28 Dec 2007 03:43:05 -0000 1.18 *************** *** 60,64 **** OBJ = $(SRC:.c=.o)
! GSRC = t_main.c t_tkcmd.c
GOBJ = $(GSRC:.c=.o) --- 60,64 ---- OBJ = $(SRC:.c=.o)
! GSRC = @GUISRC@
GOBJ = $(GSRC:.c=.o) *************** *** 84,91 **** .PHONY: pd gui externs all
! all: $(PDEXEC) $(BIN_DIR)/pd-watchdog $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend \ $(BIN_DIR)/pdreceive $(BIN_DIR)/pd.tk externs
! bin: $(PDEXEC) $(BIN_DIR)/pd-watchdog $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend \ $(BIN_DIR)/pdreceive $(BIN_DIR)/pd.tk
--- 84,91 ---- .PHONY: pd gui externs all
! all: pd $(BIN_DIR)/pd-watchdog gui $(BIN_DIR)/pdsend \ $(BIN_DIR)/pdreceive $(BIN_DIR)/pd.tk externs
! bin: pd $(BIN_DIR)/pd-watchdog gui $(BIN_DIR)/pdsend \ $(BIN_DIR)/pdreceive $(BIN_DIR)/pd.tk
*************** *** 101,105 **** --- 101,109 ---- pd: $(PDEXEC)
+ ifneq ($(GSRC),) gui: $(BIN_DIR)/$(GUINAME) + else + gui: + endif
pd-watchdog: $(BIN_DIR)/pd-watchdog *************** *** 119,123 **** $(PDEXEC): $(OBJ) $(BIN_DIR) cd ../obj; $(CC) $(LDFLAGS) $(DBG_CFLAGS) -o $(PDEXEC) $(OBJ) $(LIB) ! $(BIN_DIR)/pd-gui: $(GOBJ) $(GSRC) cd ../obj; $(CC) $(INCLUDE) -o $(BIN_DIR)/$(GUINAME) $(GOBJ) $(GLIB) --- 123,127 ---- $(PDEXEC): $(OBJ) $(BIN_DIR) cd ../obj; $(CC) $(LDFLAGS) $(DBG_CFLAGS) -o $(PDEXEC) $(OBJ) $(LIB) ! $(BIN_DIR)/pd-gui: $(GOBJ) $(GSRC) cd ../obj; $(CC) $(INCLUDE) -o $(BIN_DIR)/$(GUINAME) $(GOBJ) $(GLIB) *************** *** 171,180 **** echo "installing $$dir"; \ install -d $(pddocdir)/$$dir ; \ ! install -p ../doc/$$dir/*.* $(pddocdir)/$$dir ; \ done for dir in $(shell ls -1 ../doc/7.stuff | grep -v CVS); do \ echo "installing 7.stuff/$$dir"; \ install -d $(pddocdir)/7.stuff/$$dir ; \ ! install -p ../doc/7.stuff/$$dir/*.* $(pddocdir)/7.stuff/$$dir ; \ done mv $(ABOUT_FILE) $(ABOUT_FILE).tmp --- 175,184 ---- echo "installing $$dir"; \ install -d $(pddocdir)/$$dir ; \ ! install -m644 -p ../doc/$$dir/*.* $(pddocdir)/$$dir ; \ done for dir in $(shell ls -1 ../doc/7.stuff | grep -v CVS); do \ echo "installing 7.stuff/$$dir"; \ install -d $(pddocdir)/7.stuff/$$dir ; \ ! install -m644 -p ../doc/7.stuff/$$dir/*.* $(pddocdir)/7.stuff/$$dir ; \ done mv $(ABOUT_FILE) $(ABOUT_FILE).tmp
Index: x_acoustics.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_acoustics.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** x_acoustics.c 6 Sep 2004 20:20:36 -0000 1.2 --- x_acoustics.c 28 Dec 2007 03:43:06 -0000 1.3 *************** *** 10,14 **** #define LOGTEN 2.302585092994
! float mtof(float f) { if (f <= -1500) return(0); --- 10,14 ---- #define LOGTEN 2.302585092994
! t_float mtof(t_float f) { if (f <= -1500) return(0); *************** *** 17,46 **** }
! float ftom(float f) { return (f > 0 ? 17.3123405046 * log(.12231220585 * f) : -1500); }
! float powtodb(float f) { if (f <= 0) return (0); else { ! float val = 100 + 10./LOGTEN * log(f); return (val < 0 ? 0 : val); } }
! float rmstodb(float f) { if (f <= 0) return (0); else { ! float val = 100 + 20./LOGTEN * log(f); return (val < 0 ? 0 : val); } }
! float dbtopow(float f) { if (f <= 0) --- 17,46 ---- }
! t_float ftom(t_float f) { return (f > 0 ? 17.3123405046 * log(.12231220585 * f) : -1500); }
! t_float powtodb(t_float f) { if (f <= 0) return (0); else { ! t_float val = 100 + 10./LOGTEN * log(f); return (val < 0 ? 0 : val); } }
! t_float rmstodb(t_float f) { if (f <= 0) return (0); else { ! t_float val = 100 + 20./LOGTEN * log(f); return (val < 0 ? 0 : val); } }
! t_float dbtopow(t_float f) { if (f <= 0) *************** *** 54,58 **** }
! float dbtorms(float f) { if (f <= 0) --- 54,58 ---- }
! t_float dbtorms(t_float f) { if (f <= 0)
Index: makefile.nt =================================================================== RCS file: /cvsroot/pure-data/pd/src/makefile.nt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** makefile.nt 18 Aug 2007 23:32:44 -0000 1.11 --- makefile.nt 28 Dec 2007 03:43:05 -0000 1.12 *************** *** 3,17 **** all: pd gui ..\bin\pd.tk ..\bin\pdsend.exe ..\bin\pdreceive.exe
! VC = "C:\Program Files\Microsoft Visual Studio\VC98" #VC="\Program Files\DevStudio\Vc" ! INCLUDE = -I.\ -I..\Tcl\include -I\DXSDK\include -I$(VC)\include
! LDIR = $(VC)\lib
! LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel \ ! /NODEFAULTLIB:uuid \ ! $(LDIR)\libc.lib $(LDIR)\oldnames.lib $(LDIR)\kernel32.lib \ $(LDIR)\wsock32.lib $(LDIR)\winmm.lib $(LDIR)\advapi32.lib \ ! $(LDIR)\setupapi.lib ..\bin\pthreadVC.lib
GLIB = $(LIB) ..\bin\tcl84.lib ..\bin\tk84.lib --- 3,23 ---- all: pd gui ..\bin\pd.tk ..\bin\pdsend.exe ..\bin\pdreceive.exe
! ! VCSDK = "C:\Program Files\Microsoft SDKs\Windows\v6.0A" ! VC9 = "C:\Program Files\Microsoft Visual Studio 9.0\VC" #VC="\Program Files\DevStudio\Vc" ! INCLUDE = -I.\ -I..\Tcl\include -I\DXSDK\include -I$(VC9)\Include \ ! -I$(VCSDK)\Include
! LDIR = $(VCSDK)\lib ! LD2 = $(VC9)\lib
! LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:libc \ ! /NODEFAULTLIB:uuid $(LDIR)\kernel32.lib \ $(LDIR)\wsock32.lib $(LDIR)\winmm.lib $(LDIR)\advapi32.lib \ ! $(LDIR)\setupapi.lib ..\bin\pthreadVC.lib \ ! $(LD2)\libcmt.lib $(LD2)\oldnames.lib ! ! # \
GLIB = $(LIB) ..\bin\tcl84.lib ..\bin\tk84.lib *************** *** 98,106 ****
..\bin\pd.exe: s_entry.obj ..\bin\pd.lib ! link $(LFLAGS) /out:..\bin\pd.exe /INCREMENTAL:NO s_entry.obj \ ..\bin\pd.lib $(LIB) $(ASIOLIB)
..\bin\pd.dll ..\bin\pd.lib: $(OBJC) $(OBJASIO) ! link $(LFLAGS) /dll /export:sys_main /out:..\bin\pd.dll $(OBJC) \ $(OBJASIO) $(LIB) $(ASIOLIB)
--- 104,112 ----
..\bin\pd.exe: s_entry.obj ..\bin\pd.lib ! link $(LFLAGS) /OUT:..\bin\pd.exe /INCREMENTAL:NO s_entry.obj \ ..\bin\pd.lib $(LIB) $(ASIOLIB)
..\bin\pd.dll ..\bin\pd.lib: $(OBJC) $(OBJASIO) ! link /DLL /OUT:..\bin\pd.dll /EXPORT:sys_main $(LFLAGS) $(OBJC) \ $(OBJASIO) $(LIB) $(ASIOLIB)
Index: g_all_guis.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_all_guis.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** g_all_guis.h 16 Aug 2005 04:06:28 -0000 1.5 --- g_all_guis.h 28 Dec 2007 03:43:03 -0000 1.6 *************** *** 145,149 **** int x_ldx; int x_ldy; ! char x_font[16]; t_iem_fstyle_flags x_fsf; int x_fontsize; --- 145,149 ---- int x_ldx; int x_ldy; ! char x_font[MAXPDSTRING]; /* font names can be long! */ t_iem_fstyle_flags x_fsf; int x_fontsize; *************** *** 209,214 **** { t_iemgui x_gui; ! float x_on; ! float x_nonzero; } t_toggle;
--- 209,214 ---- { t_iemgui x_gui; ! t_float x_on; ! t_float x_nonzero; } t_toggle;
*************** *** 239,244 **** int x_peak; int x_rms; ! float x_fp; ! float x_fr; int x_scale; void *x_out_rms; --- 239,244 ---- int x_peak; int x_rms; ! t_float x_fp; ! t_float x_fr; int x_scale; void *x_out_rms;
Index: g_canvas.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** g_canvas.c 20 Jul 2007 03:25:20 -0000 1.19 --- g_canvas.c 28 Dec 2007 03:43:03 -0000 1.20 *************** *** 449,454 **** a "graph", not a text object. */ t_glist *glist_addglist(t_glist *g, t_symbol *sym, ! float x1, float y1, float x2, float y2, ! float px1, float py1, float px2, float py2) { static int gcount = 0; --- 449,454 ---- a "graph", not a text object. */ t_glist *glist_addglist(t_glist *g, t_symbol *sym, ! t_float x1, t_float y1, t_float x2, t_float y2, ! t_float px1, t_float py1, t_float px2, t_float py2) { static int gcount = 0; *************** *** 475,479 **** if (py2 < py1) { ! float zz; zz = y2; y2 = y1; --- 475,479 ---- if (py2 < py1) { ! t_float zz; zz = y2; y2 = y1; *************** *** 521,532 **** { t_symbol *sym = atom_getsymbolarg(0, argc, argv); ! float x1 = atom_getfloatarg(1, argc, argv); ! float y1 = atom_getfloatarg(2, argc, argv); ! float x2 = atom_getfloatarg(3, argc, argv); ! float y2 = atom_getfloatarg(4, argc, argv); ! float px1 = atom_getfloatarg(5, argc, argv); ! float py1 = atom_getfloatarg(6, argc, argv); ! float px2 = atom_getfloatarg(7, argc, argv); ! float py2 = atom_getfloatarg(8, argc, argv); glist_addglist(g, sym, x1, y1, x2, y2, px1, py1, px2, py2); } --- 521,532 ---- { t_symbol *sym = atom_getsymbolarg(0, argc, argv); ! t_float x1 = atom_getfloatarg(1, argc, argv); ! t_float y1 = atom_getfloatarg(2, argc, argv); ! t_float x2 = atom_getfloatarg(3, argc, argv); ! t_float y2 = atom_getfloatarg(4, argc, argv); ! t_float px1 = atom_getfloatarg(5, argc, argv); ! t_float py1 = atom_getfloatarg(6, argc, argv); ! t_float px2 = atom_getfloatarg(7, argc, argv); ! t_float py2 = atom_getfloatarg(8, argc, argv); glist_addglist(g, sym, x1, y1, x2, y2, px1, py1, px2, py2); } *************** *** 558,562 **** only appropriate if we're a regular "text" object on the parent. */ ! float diff = x->gl_y1 - x->gl_y2; t_gobj *y; x->gl_y1 = heightwas * diff; --- 558,562 ---- only appropriate if we're a regular "text" object on the parent. */ ! t_float diff = x->gl_y1 - x->gl_y2; t_gobj *y; x->gl_y1 = heightwas * diff; *************** *** 739,743 **** for (y = x->gl_list; y; y = y->g_next) if (pd_class(&y->g_pd) == canvas_class && ! ((t_canvas *)y)->gl_isgraph) canvas_create_editor((t_canvas *)y, createit); } --- 739,743 ---- for (y = x->gl_list; y; y = y->g_next) if (pd_class(&y->g_pd) == canvas_class && ! ((t_canvas *)y)->gl_isgraph && !((t_canvas *)y)->gl_havewindow) canvas_create_editor((t_canvas *)y, createit); } *************** *** 809,813 **** { t_glist *gl2 = x->gl_owner; ! canvas_create_editor(x, 1); if (glist_isvisible(gl2)) gobj_vis(&x->gl_gobj, gl2, 0); --- 809,814 ---- { t_glist *gl2 = x->gl_owner; ! if (!x->gl_owner->gl_isdeleting) ! canvas_create_editor(x, 1); if (glist_isvisible(gl2)) gobj_vis(&x->gl_gobj, gl2, 0); *************** *** 1044,1051 **** }
! /* When you ask a canvas its size the result is 2 pixels more than what ! you gave it to open it; perhaps there's a 1-pixel border all around it ! or something. Anyway, we just add the 2 pixels back here; seems we ! have to do this for linux but not MSW; not sure about MacOS. */
#ifdef __unix__ --- 1045,1050 ---- }
! /* When you ask a canvas its size the result is more than what ! you gave it to open it; how much bigger apparently depends on the OS. */
#ifdef __unix__ *************** *** 1053,1059 **** --- 1052,1063 ---- #define VERTBORDER 2 #else + #ifdef MACOSX + #define HORIZBORDER 6 + #define VERTBORDER 6 + #else #define HORIZBORDER 4 #define VERTBORDER 4 #endif + #endif
static void canvas_relocate(t_canvas *x, t_symbol *canvasgeom,
Index: notes.txt =================================================================== RCS file: /cvsroot/pure-data/pd/src/notes.txt,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** notes.txt 20 Jul 2007 03:25:20 -0000 1.36 --- notes.txt 28 Dec 2007 03:43:05 -0000 1.37 *************** *** 1,6 **** ---------------- dolist -------------------- ! binbuf_read_via_canvas in x_qlist.c
- PC device counting problem (first device invoked by -audiodev 0)
test: --- 1,9 ---- ---------------- dolist -------------------- ! fixed crash bug closing patches with open GOPs ! fixed PC device counting problem (first device invoked by -audiodev 0) ! fixed MSTACKSIZE limitation in m_binbuf.c ! fixed so that if more than one object is selected, clicking prefers to ! "hit" a selected one (better dragging after "duplicate")
test: *************** *** 13,27 **** mac: clicking on windows seems sometimes not to open them ! what does OSX do when jack is compiled into Pd but not installed?? ! turn on paMacCore_ChangeDeviceParameters for mac (pa_mac_core.h) Gnome: why don't windows pop up when clicked on?
problems: fix declare to update current patch when changed objects on GOP don't erase if you edit the GOP while they're showing - MSTACKSIZE limitation in m_binbuf.c add -stack option to make 'regular' stack larger TK menu on Windows says "wish" - activating windows in Gnome? help browser broke on Panurge offer both new and old help browser style --- 16,29 ---- mac: clicking on windows seems sometimes not to open them ! what does OSX do when jack is compiled into Pd but not installed?? ! turn on paMacCore_ChangeDeviceParameters for mac (pa_mac_core.h) Gnome: why don't windows pop up when clicked on?
problems: + check real-time gaps in writesf~ fix declare to update current patch when changed objects on GOP don't erase if you edit the GOP while they're showing add -stack option to make 'regular' stack larger TK menu on Windows says "wish" help browser broke on Panurge offer both new and old help browser style *************** *** 38,42 **** the mouse is in a window when it opens? arrays that don't fit in bounds don't update (same as red rectangle problem?) - look in d_resample.pd to understand inlet~ upsampling... patcher inlets don't deal with scalars (zbug.pd) check if there's a problem loading libs on startup if superuser --- 40,43 ---- *************** *** 56,60 ****
features: ! clickles connection (hit 'c' key or something) messages to suppress menus&accelerators, and invisibilize Pd window machine-independent fonts --- 57,62 ----
features: ! flag to prevent unlocking patches ! clickless connection (hit 'c' key? see Bouchard paper) messages to suppress menus&accelerators, and invisibilize Pd window machine-independent fonts
Index: d_resample.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_resample.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** d_resample.c 28 Nov 2004 21:20:42 -0000 1.3 --- d_resample.c 28 Dec 2007 03:43:03 -0000 1.4 *************** *** 9,14 **** t_int *downsampling_perform_0(t_int *w) { ! t_float *in = (t_float *)(w[1]); /* original signal */ ! t_float *out = (t_float *)(w[2]); /* downsampled signal */ int down = (int)(w[3]); /* downsampling factor */ int parent = (int)(w[4]); /* original vectorsize */ --- 9,14 ---- t_int *downsampling_perform_0(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); /* original signal */ ! t_sample *out = (t_sample *)(w[2]); /* downsampled signal */ int down = (int)(w[3]); /* downsampling factor */ int parent = (int)(w[4]); /* original vectorsize */ *************** *** 26,36 **** t_int *upsampling_perform_0(t_int *w) { ! t_float *in = (t_float *)(w[1]); /* original signal */ ! t_float *out = (t_float *)(w[2]); /* upsampled signal */ int up = (int)(w[3]); /* upsampling factor */ int parent = (int)(w[4]); /* original vectorsize */
int n=parent*up; ! t_float *dummy = out;
while(n--)*out++=0; --- 26,36 ---- t_int *upsampling_perform_0(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); /* original signal */ ! t_sample *out = (t_sample *)(w[2]); /* upsampled signal */ int up = (int)(w[3]); /* upsampling factor */ int parent = (int)(w[4]); /* original vectorsize */
int n=parent*up; ! t_sample *dummy = out;
while(n--)*out++=0; *************** *** 48,53 **** t_int *upsampling_perform_hold(t_int *w) { ! t_float *in = (t_float *)(w[1]); /* original signal */ ! t_float *out = (t_float *)(w[2]); /* upsampled signal */ int up = (int)(w[3]); /* upsampling factor */ int parent = (int)(w[4]); /* original vectorsize */ --- 48,53 ---- t_int *upsampling_perform_hold(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); /* original signal */ ! t_sample *out = (t_sample *)(w[2]); /* upsampled signal */ int up = (int)(w[3]); /* upsampling factor */ int parent = (int)(w[4]); /* original vectorsize */ *************** *** 55,60 ****
int n=parent; ! t_float *dum_out = out; ! t_float *dum_in = in;
while (i--) { --- 55,60 ----
int n=parent; ! t_sample *dum_out = out; ! t_sample *dum_in = in;
while (i--) { *************** *** 73,90 **** { t_resample *x= (t_resample *)(w[1]); ! t_float *in = (t_float *)(w[2]); /* original signal */ ! t_float *out = (t_float *)(w[3]); /* upsampled signal */ int up = (int)(w[4]); /* upsampling factor */ int parent = (int)(w[5]); /* original vectorsize */ int length = parent*up; int n; ! t_float *fp; ! t_float a=*x->buffer, b=*in;
for (n=0; n<length; n++) { ! t_float findex = (t_float)(n+1)/up; int index = findex; ! t_float frac=findex - index; if (frac==0.)frac=1.; *out++ = frac * b + (1.-frac) * a; --- 73,90 ---- { t_resample *x= (t_resample *)(w[1]); ! t_sample *in = (t_sample *)(w[2]); /* original signal */ ! t_sample *out = (t_sample *)(w[3]); /* upsampled signal */ int up = (int)(w[4]); /* upsampling factor */ int parent = (int)(w[5]); /* original vectorsize */ int length = parent*up; int n; ! t_sample *fp; ! t_sample a=*x->buffer, b=*in;
for (n=0; n<length; n++) { ! t_sample findex = (t_sample)(n+1)/up; int index = findex; ! t_sample frac=findex - index; if (frac==0.)frac=1.; *out++ = frac * b + (1.-frac) * a; *************** *** 181,187 ****
if (x->s_n != outsize) { ! t_float *buf=x->s_vec; t_freebytes(buf, x->s_n * sizeof(*buf)); ! buf = (t_float *)t_getbytes(outsize * sizeof(*buf)); x->s_vec = buf; x->s_n = outsize; --- 181,187 ----
if (x->s_n != outsize) { ! t_sample *buf=x->s_vec; t_freebytes(buf, x->s_n * sizeof(*buf)); ! buf = (t_sample *)t_getbytes(outsize * sizeof(*buf)); x->s_vec = buf; x->s_n = outsize; *************** *** 204,210 ****
if (x->s_n != insize) { ! t_float *buf=x->s_vec; t_freebytes(buf, x->s_n * sizeof(*buf)); ! buf = (t_float *)t_getbytes(insize * sizeof(*buf)); x->s_vec = buf; x->s_n = insize; --- 204,210 ----
if (x->s_n != insize) { ! t_sample *buf=x->s_vec; t_freebytes(buf, x->s_n * sizeof(*buf)); ! buf = (t_sample *)t_getbytes(insize * sizeof(*buf)); x->s_vec = buf; x->s_n = insize;
Index: x_time.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_time.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** x_time.c 6 Sep 2004 20:20:36 -0000 1.2 --- x_time.c 28 Dec 2007 03:43:06 -0000 1.3 *************** *** 314,318 **** int x_n; int x_nptr; ! float x_deltime; t_pipeout *x_vec; t_gpointer *x_gp; --- 314,318 ---- int x_n; int x_nptr; ! t_float x_deltime; t_pipeout *x_vec; t_gpointer *x_gp; *************** *** 328,332 **** int nptr = 0; int i; ! float deltime; if (argc) { --- 328,332 ---- int nptr = 0; int i; ! t_float deltime; if (argc) {
Index: s_entry.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_entry.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** s_entry.c 20 Jul 2007 03:25:20 -0000 1.4 --- s_entry.c 28 Dec 2007 03:43:06 -0000 1.5 *************** *** 24,27 **** --- 24,28 ---- printf("caught an exception; stopping\n"); } + return (0); }
Index: d_ctl.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_ctl.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** d_ctl.c 25 Jun 2005 02:49:08 -0000 1.4 --- d_ctl.c 28 Dec 2007 03:43:02 -0000 1.5 *************** *** 16,20 **** { t_object x_obj; ! float x_f; } t_sig;
--- 16,20 ---- { t_object x_obj; ! t_float x_f; } t_sig;
*************** *** 22,26 **** { t_float f = *(t_float *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = (int)(w[3]); while (n--) --- 22,26 ---- { t_float f = *(t_float *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]); while (n--) *************** *** 32,36 **** { t_float f = *(t_float *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = (int)(w[3]);
--- 32,36 ---- { t_float f = *(t_float *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]);
*************** *** 49,53 **** }
! void dsp_add_scalarcopy(t_sample *in, t_sample *out, int n) { if (n&7) --- 49,53 ---- }
! void dsp_add_scalarcopy(t_float *in, t_sample *out, int n) { if (n&7) *************** *** 89,100 **** { t_object x_obj; ! float x_target; ! float x_value; ! float x_biginc; ! float x_inc; ! float x_1overn; ! float x_dspticktomsec; ! float x_inletvalue; ! float x_inletwas; int x_ticksleft; int x_retarget; --- 89,100 ---- { t_object x_obj; ! t_sample x_target; /* target value of ramp */ ! t_sample x_value; /* current value of ramp at block-borders */ ! t_sample x_biginc; ! t_sample x_inc; ! t_float x_1overn; ! t_float x_dspticktomsec; ! t_float x_inletvalue; ! t_float x_inletwas; int x_ticksleft; int x_retarget; *************** *** 104,110 **** { t_line *x = (t_line *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = (int)(w[3]); ! float f = x->x_value;
if (PD_BIGORSMALL(f)) --- 104,110 ---- { t_line *x = (t_line *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]); ! t_sample f = x->x_value;
if (PD_BIGORSMALL(f)) *************** *** 115,119 **** if (!nticks) nticks = 1; x->x_ticksleft = nticks; ! x->x_biginc = (x->x_target - x->x_value)/(float)nticks; x->x_inc = x->x_1overn * x->x_biginc; x->x_retarget = 0; --- 115,119 ---- if (!nticks) nticks = 1; x->x_ticksleft = nticks; ! x->x_biginc = (x->x_target - x->x_value)/(t_float)nticks; x->x_inc = x->x_1overn * x->x_biginc; x->x_retarget = 0; *************** *** 121,125 **** if (x->x_ticksleft) { ! float f = x->x_value; while (n--) *out++ = f, f += x->x_inc; x->x_value += x->x_biginc; --- 121,125 ---- if (x->x_ticksleft) { ! t_sample f = x->x_value; while (n--) *out++ = f, f += x->x_inc; x->x_value += x->x_biginc; *************** *** 128,132 **** else { ! float g = x->x_value = x->x_target; while (n--) *out++ = g; --- 128,132 ---- else { ! t_sample g = x->x_value = x->x_target; while (n--) *out++ = g; *************** *** 139,145 **** { t_line *x = (t_line *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = (int)(w[3]); ! float f = x->x_value;
if (PD_BIGORSMALL(f)) --- 139,145 ---- { t_line *x = (t_line *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]); ! t_sample f = x->x_value;
if (PD_BIGORSMALL(f)) *************** *** 150,154 **** if (!nticks) nticks = 1; x->x_ticksleft = nticks; ! x->x_biginc = (x->x_target - x->x_value)/(float)nticks; x->x_inc = x->x_1overn * x->x_biginc; x->x_retarget = 0; --- 150,154 ---- if (!nticks) nticks = 1; x->x_ticksleft = nticks; ! x->x_biginc = (x->x_target - x->x_value)/(t_sample)nticks; x->x_inc = x->x_1overn * x->x_biginc; x->x_retarget = 0; *************** *** 156,160 **** if (x->x_ticksleft) { ! float f = x->x_value; while (n--) *out++ = f, f += x->x_inc; x->x_value += x->x_biginc; --- 156,160 ---- if (x->x_ticksleft) { ! t_sample f = x->x_value; while (n--) *out++ = f, f += x->x_inc; x->x_value += x->x_biginc; *************** *** 163,167 **** else { ! float f = x->x_value = x->x_target; for (; n; n -= 8, out += 8) { --- 163,167 ---- else { ! t_sample f = x->x_value = x->x_target; for (; n; n -= 8, out += 8) { *************** *** 233,237 **** double s_targettime; double s_starttime; ! float s_target; struct _vseg *s_next; } t_vseg; --- 233,237 ---- double s_targettime; double s_starttime; ! t_sample s_target; struct _vseg *s_next; } t_vseg; *************** *** 246,252 **** double x_msecpersamp; double x_targettime; ! float x_target; ! float x_inlet1; ! float x_inlet2; t_vseg *x_list; } t_vline; --- 246,252 ---- double x_msecpersamp; double x_targettime; ! t_sample x_target; ! t_float x_inlet1; ! t_float x_inlet2; t_vseg *x_list; } t_vline; *************** *** 321,326 **** { double timenow = clock_gettimesince(x->x_referencetime); ! float inlet1 = (x->x_inlet1 < 0 ? 0 : x->x_inlet1); ! float inlet2 = x->x_inlet2; double starttime = timenow + inlet2; t_vseg *s1, *s2, *deletefrom = 0, *snew; --- 321,326 ---- { double timenow = clock_gettimesince(x->x_referencetime); ! t_float inlet1 = (x->x_inlet1 < 0 ? 0 : x->x_inlet1); ! t_float inlet2 = x->x_inlet2; double starttime = timenow + inlet2; t_vseg *s1, *s2, *deletefrom = 0, *snew; *************** *** 417,421 **** t_object x_obj; t_sample x_value; ! float x_f; } t_snapshot;
--- 417,421 ---- t_object x_obj; t_sample x_value; ! t_float x_f; } t_snapshot;
*************** *** 431,436 **** static t_int *snapshot_tilde_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float *out = (t_float *)(w[2]); *out = *in; return (w+3); --- 431,436 ---- static t_int *snapshot_tilde_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); *out = *in; return (w+3); *************** *** 474,479 **** int x_gotone; t_sample *x_vec; ! float x_f; ! float x_sampspermsec; double x_time; } t_vsnapshot; --- 474,479 ---- int x_gotone; t_sample *x_vec; ! t_float x_f; ! t_float x_sampspermsec; double x_time; } t_vsnapshot; *************** *** 492,498 **** static t_int *vsnapshot_tilde_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_vsnapshot *x = (t_vsnapshot *)(w[2]); ! t_float *out = x->x_vec; int n = x->x_n, i; for (i = 0; i < n; i++) --- 492,498 ---- static t_int *vsnapshot_tilde_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_vsnapshot *x = (t_vsnapshot *)(w[2]); ! t_sample *out = x->x_vec; int n = x->x_n, i; for (i = 0; i < n; i++) *************** *** 520,524 **** static void vsnapshot_tilde_bang(t_vsnapshot *x) { ! float val; if (x->x_gotone) { --- 520,524 ---- static void vsnapshot_tilde_bang(t_vsnapshot *x) { ! t_sample val; if (x->x_gotone) { *************** *** 561,572 **** void *x_outlet; /* a "float" outlet */ void *x_clock; /* a "clock" object */ ! float *x_buf; /* a Hanning window */ int x_phase; /* number of points since last output */ int x_period; /* requested period of output */ int x_realperiod; /* period rounded up to vecsize multiple */ int x_npoints; /* analysis window size in samples */ ! float x_result; /* result to output */ ! float x_sumbuf[MAXOVERLAP]; /* summing buffer */ ! float x_f; int x_allocforvs; /* extra buffer for DSP vector size */ } t_sigenv; --- 561,572 ---- void *x_outlet; /* a "float" outlet */ void *x_clock; /* a "clock" object */ ! t_sample *x_buf; /* a Hanning window */ int x_phase; /* number of points since last output */ int x_period; /* requested period of output */ int x_realperiod; /* period rounded up to vecsize multiple */ int x_npoints; /* analysis window size in samples */ ! t_float x_result; /* result to output */ ! t_sample x_sumbuf[MAXOVERLAP]; /* summing buffer */ ! t_float x_f; int x_allocforvs; /* extra buffer for DSP vector size */ } t_sigenv; *************** *** 580,584 **** int period = fperiod; t_sigenv *x; ! float *buf; int i;
--- 580,584 ---- int period = fperiod; t_sigenv *x; ! t_sample *buf; int i;
*************** *** 587,591 **** if (period < npoints / MAXOVERLAP + 1) period = npoints / MAXOVERLAP + 1; ! if (!(buf = getbytes(sizeof(float) * (npoints + INITVSTAKEN)))) { error("env: couldn't allocate buffer"); --- 587,591 ---- if (period < npoints / MAXOVERLAP + 1) period = npoints / MAXOVERLAP + 1; ! if (!(buf = getbytes(sizeof(t_sample) * (npoints + INITVSTAKEN)))) { error("env: couldn't allocate buffer"); *************** *** 611,625 **** { t_sigenv *x = (t_sigenv *)(w[1]); ! t_float *in = (t_float *)(w[2]); int n = (int)(w[3]); int count; ! float *sump; in += n; for (count = x->x_phase, sump = x->x_sumbuf; count < x->x_npoints; count += x->x_realperiod, sump++) { ! float *hp = x->x_buf + count; ! float *fp = in; ! float sum = *sump; int i;
--- 611,625 ---- { t_sigenv *x = (t_sigenv *)(w[1]); ! t_sample *in = (t_sample *)(w[2]); int n = (int)(w[3]); int count; ! t_sample *sump; in += n; for (count = x->x_phase, sump = x->x_sumbuf; count < x->x_npoints; count += x->x_realperiod, sump++) { ! t_sample *hp = x->x_buf + count; ! t_sample *fp = in; ! t_sample sum = *sump; int i;
*************** *** 654,659 **** { void *xx = resizebytes(x->x_buf, ! (x->x_npoints + x->x_allocforvs) * sizeof(float), ! (x->x_npoints + sp[0]->s_n) * sizeof(float)); if (!xx) { --- 654,659 ---- { void *xx = resizebytes(x->x_buf, ! (x->x_npoints + x->x_allocforvs) * sizeof(t_sample), ! (x->x_npoints + sp[0]->s_n) * sizeof(t_sample)); if (!xx) { *************** *** 661,665 **** return; } ! x->x_buf = (t_float *)xx; x->x_allocforvs = sp[0]->s_n; } --- 661,665 ---- return; } ! x->x_buf = (t_sample *)xx; x->x_allocforvs = sp[0]->s_n; } *************** *** 675,679 **** { clock_free(x->x_clock); ! freebytes(x->x_buf, (x->x_npoints + x->x_allocforvs) * sizeof(float)); }
--- 675,679 ---- { clock_free(x->x_clock); ! freebytes(x->x_buf, (x->x_npoints + x->x_allocforvs) * sizeof(*x->x_buf)); }
*************** *** 697,708 **** t_outlet *x_outlet2; /* bang out for low thresh */ t_clock *x_clock; /* wakeup for message output */ ! float x_f; /* scalar inlet */ int x_state; /* 1 = high, 0 = low */ ! float x_hithresh; /* value of high threshold */ ! float x_lothresh; /* value of low threshold */ ! float x_deadwait; /* msec remaining in dead period */ ! float x_msecpertick; /* msec per DSP tick */ ! float x_hideadtime; /* hi dead time in msec */ ! float x_lodeadtime; /* lo dead time in msec */ } t_threshold_tilde;
--- 697,708 ---- t_outlet *x_outlet2; /* bang out for low thresh */ t_clock *x_clock; /* wakeup for message output */ ! t_float x_f; /* scalar inlet */ int x_state; /* 1 = high, 0 = low */ ! t_float x_hithresh; /* value of high threshold */ ! t_float x_lothresh; /* value of low threshold */ ! t_float x_deadwait; /* msec remaining in dead period */ ! t_float x_msecpertick; /* msec per DSP tick */ ! t_float x_hideadtime; /* hi dead time in msec */ ! t_float x_lodeadtime; /* lo dead time in msec */ } t_threshold_tilde;
*************** *** 759,763 **** static t_int *threshold_tilde_perform(t_int *w) { ! float *in1 = (float *)(w[1]); t_threshold_tilde *x = (t_threshold_tilde *)(w[2]); int n = (t_int)(w[3]); --- 759,763 ---- static t_int *threshold_tilde_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); t_threshold_tilde *x = (t_threshold_tilde *)(w[2]); int n = (t_int)(w[3]);
Index: d_misc.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_misc.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** d_misc.c 21 Aug 2005 14:46:17 -0000 1.5 --- d_misc.c 28 Dec 2007 03:43:03 -0000 1.6 *************** *** 16,20 **** { t_object x_obj; ! float x_f; t_symbol *x_sym; int x_count; --- 16,20 ---- { t_object x_obj; ! t_float x_f; t_symbol *x_sym; int x_count; *************** *** 24,43 **** { t_print *x = (t_print *)(w[1]); ! t_float *in = (t_float *)(w[2]); int n = (int)(w[3]); if (x->x_count) { ! post("%s:", x->x_sym->s_name); ! if (n == 1) post("%8g", in[0]); ! else if (n == 2) post("%8g %8g", in[0], in[1]); ! else if (n == 4) post("%8g %8g %8g %8g", ! in[0], in[1], in[2], in[3]); ! else while (n > 0) ! { ! post("%-8.5g %-8.5g %-8.5g %-8.5g %-8.5g %-8.5g %-8.5g %-8.5g", ! in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7]); ! n -= 8; ! in += 8; } x->x_count--; } --- 24,38 ---- { t_print *x = (t_print *)(w[1]); ! t_sample *in = (t_sample *)(w[2]); int n = (int)(w[3]); if (x->x_count) { ! int i=0; ! startpost("%s:", x->x_sym->s_name); ! for(i=0; i<n; i++) { ! if(i%8==0)endpost(); ! startpost("%-8.5g", in[i]); } + endpost(); x->x_count--; }
Index: g_hslider.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_hslider.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** g_hslider.c 8 Sep 2006 23:45:30 -0000 1.6 --- g_hslider.c 28 Dec 2007 03:43:04 -0000 1.7 *************** *** 77,85 **** ypos + x->x_gui.x_h, x->x_gui.x_fcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", --- 77,86 ---- ypos + x->x_gui.x_h, x->x_gui.x_fcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, ! x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", *************** *** 137,142 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); --- 138,143 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); *************** *** 223,227 **** (int)x->x_gui.x_obj.te_xpix, (int)x->x_gui.x_obj.te_ypix, gensym("hsl"), x->x_gui.x_w, x->x_gui.x_h, ! (float)x->x_min, (float)x->x_max, x->x_lin0_log1, iem_symargstoint(&x->x_gui.x_isa), srl[0], srl[1], srl[2], --- 224,228 ---- (int)x->x_gui.x_obj.te_xpix, (int)x->x_gui.x_obj.te_ypix, gensym("hsl"), x->x_gui.x_w, x->x_gui.x_h, ! (t_float)x->x_min, (t_float)x->x_max, x->x_lin0_log1, iem_symargstoint(&x->x_gui.x_isa), srl[0], srl[1], srl[2], *************** *** 286,290 ****
iemgui_properties(&x->x_gui, srl); ! sprintf(buf, "pdtk_iemgui_dialog %%s HSLIDER \ --------dimensions(pix)(pix):-------- %d %d width: %d %d height: \ -----------output-range:----------- %g left: %g right: %g \ --- 287,291 ----
iemgui_properties(&x->x_gui, srl); ! sprintf(buf, "pdtk_iemgui_dialog %%s |hsl| \ --------dimensions(pix)(pix):-------- %d %d width: %d %d height: \ -----------output-range:----------- %g left: %g right: %g \ *************** *** 587,591 **** else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, "courier"); } if(x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv); --- 588,592 ---- else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, sys_font); } if(x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
Index: s_audio.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** s_audio.c 28 Dec 2007 03:28:31 -0000 1.15 --- s_audio.c 28 Dec 2007 03:43:05 -0000 1.16 *************** *** 40,51 **** int sys_blocksize = 0; /* audio I/O block size in sample frames */ int sys_audioapi = API_DEFAULT; ! static int sys_meters; /* true if we're metering */ ! static float sys_inmax; /* max input amplitude */ ! static float sys_outmax; /* max output amplitude */
/* exported variables */ int sys_schedadvance; /* scheduler advance in microseconds */ ! float sys_dacsr;
t_sample *sys_soundout; --- 40,51 ---- int sys_blocksize = 0; /* audio I/O block size in sample frames */ int sys_audioapi = API_DEFAULT; ! int sys_audioapiopened = -1; /* save last API opened for later closing */ static int sys_meters; /* true if we're metering */ ! static t_sample sys_inmax; /* max input amplitude */ ! static t_sample sys_outmax; /* max output amplitude */
/* exported variables */ int sys_schedadvance; /* scheduler advance in microseconds */ ! t_float sys_dacsr;
t_sample *sys_soundout; *************** *** 68,72 **** --- 68,75 ---- static int audio_callback;
+ static int audio_callback_is_open; /* reflects true actual state */ + static int audio_nextinchans, audio_nextoutchans; void sched_audio_callbackfn(void); + void sched_reopenmeplease(void);
static int audio_isopen(void) *************** *** 138,153 **** int nblk; int inbytes = (chin ? chin : 2) * ! (DEFDACBLKSIZE*sizeof(float)); int outbytes = (chout ? chout : 2) * ! (DEFDACBLKSIZE*sizeof(float));
if (sys_soundin) freebytes(sys_soundin, (sys_inchannels? sys_inchannels : 2) * ! (DEFDACBLKSIZE*sizeof(float))); if (sys_soundout) freebytes(sys_soundout, (sys_outchannels? sys_outchannels : 2) * ! (DEFDACBLKSIZE*sizeof(float))); sys_inchannels = chin; sys_outchannels = chout; --- 141,156 ---- int nblk; int inbytes = (chin ? chin : 2) * ! (DEFDACBLKSIZE*sizeof(t_sample)); int outbytes = (chout ? chout : 2) * ! (DEFDACBLKSIZE*sizeof(t_sample));
if (sys_soundin) freebytes(sys_soundin, (sys_inchannels? sys_inchannels : 2) * ! (DEFDACBLKSIZE*sizeof(t_sample))); if (sys_soundout) freebytes(sys_soundout, (sys_outchannels? sys_outchannels : 2) * ! (DEFDACBLKSIZE*sizeof(t_sample))); sys_inchannels = chin; sys_outchannels = chout; *************** *** 157,164 **** sys_advance_samples = 3 * DEFDACBLKSIZE;
! sys_soundin = (t_float *)getbytes(inbytes); memset(sys_soundin, 0, inbytes);
! sys_soundout = (t_float *)getbytes(outbytes); memset(sys_soundout, 0, outbytes);
--- 160,167 ---- sys_advance_samples = 3 * DEFDACBLKSIZE;
! sys_soundin = (t_sample *)getbytes(inbytes); memset(sys_soundin, 0, inbytes);
! sys_soundout = (t_sample *)getbytes(outbytes); memset(sys_soundout, 0, outbytes);
*************** *** 194,200 **** return; } - /* if we're already open close it */ - if (sys_inchannels || sys_outchannels) - sys_close_audio();
if (rate < 1) --- 197,200 ---- *************** *** 325,332 **** } sys_schedadvance = advance * 1000; - sys_setchsr(inchans, outchans, rate); sys_log_error(ERR_NOTHING); sys_save_audio_params(nrealindev, realindev, realinchans, ! nrealoutdev, realoutdev, realoutchans, sys_dacsr, advance, callback); }
--- 325,333 ---- } sys_schedadvance = advance * 1000; sys_log_error(ERR_NOTHING); + audio_nextinchans = inchans; + audio_nextoutchans = outchans; sys_save_audio_params(nrealindev, realindev, realinchans, ! nrealoutdev, realoutdev, realoutchans, rate, advance, callback); }
*************** *** 340,370 **** return; #ifdef USEAPI_PORTAUDIO ! if (sys_audioapi == API_PORTAUDIO) pa_close_audio(); else #endif #ifdef USEAPI_JACK ! if (sys_audioapi == API_JACK) jack_close_audio(); else #endif #ifdef USEAPI_OSS ! if (sys_audioapi == API_OSS) oss_close_audio(); else #endif #ifdef USEAPI_ALSA ! if (sys_audioapi == API_ALSA) alsa_close_audio(); else #endif #ifdef USEAPI_MMIO ! if (sys_audioapi == API_MMIO) mmio_close_audio(); else #endif ! post("sys_close_audio: unknown API %d", sys_audioapi); sys_inchannels = sys_outchannels = 0; sched_set_using_audio(SCHED_AUDIO_NONE); }
--- 341,374 ---- return; #ifdef USEAPI_PORTAUDIO ! if (sys_audioapiopened == API_PORTAUDIO) pa_close_audio(); else #endif #ifdef USEAPI_JACK ! if (sys_audioapiopened == API_JACK) jack_close_audio(); else #endif #ifdef USEAPI_OSS ! if (sys_audioapiopened == API_OSS) oss_close_audio(); else #endif #ifdef USEAPI_ALSA ! if (sys_audioapiopened == API_ALSA) alsa_close_audio(); else #endif #ifdef USEAPI_MMIO ! if (sys_audioapiopened == API_MMIO) mmio_close_audio(); else #endif ! post("sys_close_audio: unknown API %d", sys_audioapiopened); sys_inchannels = sys_outchannels = 0; + sys_audioapiopened = -1; sched_set_using_audio(SCHED_AUDIO_NONE); + audio_state = 0; + audio_callback_is_open = 0; }
*************** *** 377,380 **** --- 381,385 ---- sys_get_audio_params(&naudioindev, audioindev, chindev, &naudiooutdev, audiooutdev, choutdev, &rate, &advance, &callback); + sys_setchsr(audio_nextinchans, audio_nextoutchans, rate); if (!naudioindev && !naudiooutdev) { *************** *** 427,436 **** --- 432,446 ---- audio_state = 0; sched_set_using_audio(SCHED_AUDIO_NONE); + sys_audioapiopened = -1; + audio_callback_is_open = 0; } else { + /* fprintf(stderr, "started w/callback %d\n", callback); */ audio_state = 1; sched_set_using_audio( (callback ? SCHED_AUDIO_CALLBACK : SCHED_AUDIO_POLL)); + sys_audioapiopened = sys_audioapi; + audio_callback_is_open = callback; } sys_vgui("set pd_whichapi %d\n", (outcome == 0 ? sys_audioapi : 0)); *************** *** 442,450 **** { int i, n; ! float maxsamp; for (i = 0, n = sys_inchannels * DEFDACBLKSIZE, maxsamp = sys_inmax; i < n; i++) { ! float f = sys_soundin[i]; if (f > maxsamp) maxsamp = f; else if (-f > maxsamp) maxsamp = -f; --- 452,460 ---- { int i, n; ! t_sample maxsamp; for (i = 0, n = sys_inchannels * DEFDACBLKSIZE, maxsamp = sys_inmax; i < n; i++) { ! t_sample f = sys_soundin[i]; if (f > maxsamp) maxsamp = f; else if (-f > maxsamp) maxsamp = -f; *************** *** 454,458 **** i < n; i++) { ! float f = sys_soundout[i]; if (f > maxsamp) maxsamp = f; else if (-f > maxsamp) maxsamp = -f; --- 464,468 ---- i < n; i++) { ! t_sample f = sys_soundout[i]; if (f > maxsamp) maxsamp = f; else if (-f > maxsamp) maxsamp = -f; *************** *** 490,494 **** }
! float sys_getsr(void) { return (sys_dacsr); --- 500,504 ---- }
! t_float sys_getsr(void) { return (sys_dacsr); *************** *** 505,509 **** }
! void sys_getmeters(float *inmax, float *outmax) { if (inmax) --- 515,519 ---- }
! void sys_getmeters(t_sample *inmax, t_sample *outmax) { if (inmax) *************** *** 685,688 **** --- 695,699 ---- }
+ extern int pa_foo; /* new values from dialog window */ void glob_audio_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv) *************** *** 698,702 **** int newadvance = atom_getintarg(17, argc, argv); int newcallback = atom_getintarg(18, argc, argv); - int statewas;
for (i = 0; i < 4; i++) --- 709,712 ---- *************** *** 733,743 **** if (newcallback < 0) newcallback = 0; ! if (audio_callback == newcallback) sys_close_audio(); sys_set_audio_settings(nindev, newaudioindev, nindev, newaudioinchan, noutdev, newaudiooutdev, noutdev, newaudiooutchan, newrate, newadvance, (newcallback >= 0 ? newcallback : 0)); ! if (audio_callback == newcallback) sys_reopen_audio(); }
--- 743,754 ---- if (newcallback < 0) newcallback = 0; ! if (!audio_callback_is_open && !newcallback) sys_close_audio(); sys_set_audio_settings(nindev, newaudioindev, nindev, newaudioinchan, noutdev, newaudiooutdev, noutdev, newaudiooutchan, newrate, newadvance, (newcallback >= 0 ? newcallback : 0)); ! if (!audio_callback_is_open && !newcallback) sys_reopen_audio(); + else sched_reopenmeplease(); }
*************** *** 816,820 **** { sys_close_audio(); - audio_state = 0; } } --- 827,830 ---- *************** *** 833,837 **** sys_close_audio(); } - audio_state = onoff; }
--- 843,846 ----
Index: d_osc.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_osc.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** d_osc.c 20 Jan 2007 04:06:06 -0000 1.6 --- d_osc.c 28 Dec 2007 03:43:03 -0000 1.7 *************** *** 480,484 **** static t_int *noise_perform(t_int *w) { ! t_float *out = (t_float *)(w[1]); int *vp = (int *)(w[2]); int n = (int)(w[3]); --- 480,484 ---- static t_int *noise_perform(t_int *w) { ! t_sample *out = (t_sample *)(w[1]); int *vp = (int *)(w[2]); int n = (int)(w[3]);
Index: x_midi.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_midi.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** x_midi.c 2 Aug 2007 00:33:50 -0000 1.5 --- x_midi.c 28 Dec 2007 03:43:06 -0000 1.6 *************** *** 136,142 **** static void notein_list(t_notein *x, t_symbol *s, int argc, t_atom *argv) { ! float pitch = atom_getfloatarg(0, argc, argv); ! float velo = atom_getfloatarg(1, argc, argv); ! float channel = atom_getfloatarg(2, argc, argv); if (x->x_channel != 0) { --- 136,142 ---- static void notein_list(t_notein *x, t_symbol *s, int argc, t_atom *argv) { ! t_float pitch = atom_getfloatarg(0, argc, argv); ! t_float velo = atom_getfloatarg(1, argc, argv); ! t_float channel = atom_getfloatarg(2, argc, argv); if (x->x_channel != 0) { *************** *** 279,284 **** static void pgmin_list(t_pgmin *x, t_symbol *s, int argc, t_atom *argv) { ! float value = atom_getfloatarg(0, argc, argv); ! float channel = atom_getfloatarg(1, argc, argv); if (x->x_channel != 0) { --- 279,284 ---- static void pgmin_list(t_pgmin *x, t_symbol *s, int argc, t_atom *argv) { ! t_float value = atom_getfloatarg(0, argc, argv); ! t_float channel = atom_getfloatarg(1, argc, argv); if (x->x_channel != 0) { *************** *** 547,552 **** static void midiclkin_list(t_midiclkin *x, t_symbol *s, int argc, t_atom *argv) { ! float value = atom_getfloatarg(0, argc, argv); ! float count = atom_getfloatarg(1, argc, argv); outlet_float(x->x_outlet2, count); outlet_float(x->x_outlet1, value); --- 547,552 ---- static void midiclkin_list(t_midiclkin *x, t_symbol *s, int argc, t_atom *argv) { ! t_float value = atom_getfloatarg(0, argc, argv); ! t_float count = atom_getfloatarg(1, argc, argv); outlet_float(x->x_outlet2, count); outlet_float(x->x_outlet1, value); *************** *** 571,577 **** {
! static float prev = 0; ! static float count = 0; ! float cur,diff;
if (midiclkin_sym->s_thing) --- 571,577 ---- {
! static t_float prev = 0; ! static t_float count = 0; ! t_float cur,diff;
if (midiclkin_sym->s_thing) *************** *** 622,627 **** int argc, t_atom *argv) { ! float portno = atom_getfloatarg(0, argc, argv); ! float byte = atom_getfloatarg(1, argc, argv);
outlet_float(x->x_outlet2, portno); --- 622,627 ---- int argc, t_atom *argv) { ! t_float portno = atom_getfloatarg(0, argc, argv); ! t_float byte = atom_getfloatarg(1, argc, argv);
outlet_float(x->x_outlet2, portno); *************** *** 1069,1073 **** typedef struct voice { ! float v_pitch; int v_used; unsigned long v_serial; --- 1069,1073 ---- typedef struct voice { ! t_float v_pitch; int v_used; unsigned long v_serial; *************** *** 1079,1083 **** int x_n; t_voice *x_vec; ! float x_vel; t_outlet *x_pitchout; t_outlet *x_velout; --- 1079,1083 ---- int x_n; t_voice *x_vec; ! t_float x_vel; t_outlet *x_pitchout; t_outlet *x_velout; *************** *** 1086,1090 **** } t_poly;
! static void *poly_new(float fnvoice, float fsteal) { int i, n = fnvoice; --- 1086,1090 ---- } t_poly;
! static void *poly_new(t_float fnvoice, t_float fsteal) { int i, n = fnvoice;
Index: x_arithmetic.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_arithmetic.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** x_arithmetic.c 18 Aug 2007 23:32:44 -0000 1.5 --- x_arithmetic.c 28 Dec 2007 03:43:06 -0000 1.6 *************** *** 552,557 **** static void tan_float(t_object *x, t_float f) { ! float c = cosf(f); ! float t = (c == 0 ? 0 : sinf(f)/c); outlet_float(x->ob_outlet, t); } --- 552,557 ---- static void tan_float(t_object *x, t_float f) { ! t_float c = cosf(f); ! t_float t = (c == 0 ? 0 : sinf(f)/c); outlet_float(x->ob_outlet, t); } *************** *** 576,580 **** { t_object x_ob; ! float x_f; } t_atan2;
--- 576,580 ---- { t_object x_ob; ! t_float x_f; } t_atan2;
*************** *** 590,594 **** static void atan2_float(t_atan2 *x, t_float f) { ! float r = (f == 0 && x->x_f == 0 ? 0 : atan2f(f, x->x_f)); outlet_float(x->x_ob.ob_outlet, r); } --- 590,594 ---- static void atan2_float(t_atan2 *x, t_float f) { ! t_float r = (f == 0 && x->x_f == 0 ? 0 : atan2f(f, x->x_f)); outlet_float(x->x_ob.ob_outlet, r); } *************** *** 605,609 **** static void sqrt_float(t_object *x, t_float f) { ! float r = (f > 0 ? sqrtf(f) : 0); outlet_float(x->ob_outlet, r); } --- 605,609 ---- static void sqrt_float(t_object *x, t_float f) { ! t_float r = (f > 0 ? sqrtf(f) : 0); outlet_float(x->ob_outlet, r); } *************** *** 620,624 **** static void log_float(t_object *x, t_float f) { ! float r = (f > 0 ? logf(f) : -1000); outlet_float(x->ob_outlet, r); } --- 620,624 ---- static void log_float(t_object *x, t_float f) { ! t_float r = (f > 0 ? logf(f) : -1000); outlet_float(x->ob_outlet, r); } *************** *** 637,641 **** static void exp_float(t_object *x, t_float f) { ! float g; #ifdef MSW char buf[10]; --- 637,641 ---- static void exp_float(t_object *x, t_float f) { ! t_float g; #ifdef MSW char buf[10]; *************** *** 667,673 **** { t_object x_ob; ! float x_f1; ! float x_f2; ! float x_f3; } t_clip;
--- 667,673 ---- { t_object x_ob; ! t_float x_f1; ! t_float x_f2; ! t_float x_f3; } t_clip;
Index: g_text.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_text.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** g_text.c 4 Oct 2006 19:35:06 -0000 1.15 --- g_text.c 28 Dec 2007 03:43:04 -0000 1.16 *************** *** 146,151 **** atom_getintarg(1, argc, argv), 0, b); } ! else ! { t_binbuf *b = binbuf_new(); int xpix, ypix; --- 146,154 ---- atom_getintarg(1, argc, argv), 0, b); } ! else if(!glist_isvisible(gl)){ ! /* JMZ: not a good idea to go into interactive mode in a closed canvas... */ ! post("unable to create stub object in closed canvas!"); ! return; ! } else { t_binbuf *b = binbuf_new(); int xpix, ypix; *************** *** 418,421 **** --- 421,429 ---- { int xpix, ypix; + /* JMZ: not a good idea to go into interactive mode in a closed canvas... */ + if(!glist_isvisible(gl)){ + post("unable to create stub message in closed canvas!"); + return; + } pd_vmess(&gl->gl_pd, gensym("editmode"), "i", 1); glist_noselect(gl); *************** *** 923,927 **** t_text *x = (t_text *)z; int width, height, iscomment = (x->te_type == T_TEXT); ! float x1, y1, x2, y2;
/* for number boxes, we know width and height a priori, and should --- 931,935 ---- t_text *x = (t_text *)z; int width, height, iscomment = (x->te_type == T_TEXT); ! t_float x1, y1, x2, y2;
/* for number boxes, we know width and height a priori, and should
Index: d_dac.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_dac.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** d_dac.c 6 Sep 2004 20:20:33 -0000 1.3 --- d_dac.c 28 Dec 2007 03:43:03 -0000 1.4 *************** *** 17,21 **** t_int x_n; t_int *x_vec; ! float x_f; } t_dac;
--- 17,21 ---- t_int x_n; t_int *x_vec; ! t_float x_f; } t_dac;
*************** *** 104,109 **** t_int *copy_perform(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = (int)(w[3]); while (n--) *out++ = *in1++; --- 104,109 ---- t_int *copy_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]); while (n--) *out++ = *in1++; *************** *** 113,130 **** t_int *copy_perf8(t_int *w) { ! t_float *in1 = (t_float *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = (int)(w[3]);
for (; n; n -= 8, in1 += 8, out += 8) { ! float f0 = in1[0]; ! float f1 = in1[1]; ! float f2 = in1[2]; ! float f3 = in1[3]; ! float f4 = in1[4]; ! float f5 = in1[5]; ! float f6 = in1[6]; ! float f7 = in1[7];
out[0] = f0; --- 113,130 ---- t_int *copy_perf8(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]);
for (; n; n -= 8, in1 += 8, out += 8) { ! t_sample f0 = in1[0]; ! t_sample f1 = in1[1]; ! t_sample f2 = in1[2]; ! t_sample f3 = in1[3]; ! t_sample f4 = in1[4]; ! t_sample f5 = in1[5]; ! t_sample f6 = in1[6]; ! t_sample f7 = in1[7];
out[0] = f0;
Index: s_main.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_main.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** s_main.c 18 Aug 2007 23:32:44 -0000 1.31 --- s_main.c 28 Dec 2007 03:43:06 -0000 1.32 *************** *** 59,63 **** int sys_midioutdevlist[MAXMIDIOUTDEV] = {1};
! char sys_font[100] = "courier"; /* tb: font name */ static int sys_main_srate; static int sys_main_advance; --- 59,69 ---- int sys_midioutdevlist[MAXMIDIOUTDEV] = {1};
! char sys_font[100] = ! #ifdef MSW ! "Courier"; ! #else ! "Courier"; ! #endif ! char sys_fontweight[] = "bold "; /* currently only used for iemguis */ static int sys_main_srate; static int sys_main_advance; *************** *** 90,94 **** int* get_sys_schedblocksize() { return &sys_schedblocksize; } double* get_sys_time() { return &sys_time; } ! float* get_sys_dacsr() { return &sys_dacsr; } int* get_sys_sleepgrain() { return &sys_sleepgrain; } int* get_sys_schedadvance() { return &sys_schedadvance; } --- 96,100 ---- int* get_sys_schedblocksize() { return &sys_schedblocksize; } double* get_sys_time() { return &sys_time; } ! t_float* get_sys_dacsr() { return &sys_dacsr; } int* get_sys_sleepgrain() { return &sys_sleepgrain; } int* get_sys_schedadvance() { return &sys_schedadvance; } *************** *** 160,168 ****
int sys_defaultfont; - #ifdef MSW - #define DEFAULTFONT 12 - #else #define DEFAULTFONT 10 - #endif
static void openit(const char *dirname, const char *filename) --- 166,170 ---- *************** *** 384,389 **** "-open <file> -- open file(s) on startup\n", "-lib <file> -- load object library(s)\n", ! "-font <n> -- specify default font size in points\n", ! "-typeface <name> -- specify default font (default: courier)\n", "-verbose -- extra printout on startup and when searching for files\n", "-version -- don't run Pd; just print out which version it is \n", --- 386,392 ---- "-open <file> -- open file(s) on startup\n", "-lib <file> -- load object library(s)\n", ! "-font-size <n> -- specify default font size in points\n", ! "-font-face <name> -- specify default font (default: Bitstream Vera Sans Mono)\n", ! "-font-weight <name>-- specify default font weight (normal or bold)\n", "-verbose -- extra printout on startup and when searching for files\n", "-version -- don't run Pd; just print out which version it is \n", *************** *** 745,749 **** argc -= 2; argv += 2; } ! else if (!strcmp(*argv, "-font") && argc > 1) { sys_defaultfont = sys_nearestfontsize(atoi(argv[1])); --- 748,752 ---- argc -= 2; argv += 2; } ! else if ((!strcmp(*argv, "-font-size") || !strcmp(*argv, "-font")) && argc > 1) { sys_defaultfont = sys_nearestfontsize(atoi(argv[1])); *************** *** 751,756 **** argv += 2; } ! /* tb: font name { */ ! else if (!strcmp(*argv, "-typeface") && argc > 1) { strncpy(sys_font,*(argv+1),sizeof(sys_font)-1); --- 754,758 ---- argv += 2; } ! else if ((!strcmp(*argv, "-font-face") || !strcmp(*argv, "-typeface")) && argc > 1) { strncpy(sys_font,*(argv+1),sizeof(sys_font)-1); *************** *** 759,763 **** argv += 2; } ! /* } tb */ else if (!strcmp(*argv, "-verbose")) { --- 761,771 ---- argv += 2; } ! else if (!strcmp(*argv, "-font-weight") && argc > 1) ! { ! strncpy(sys_fontweight,*(argv+1),sizeof(sys_fontweight)-1); ! sys_fontweight[sizeof(sys_fontweight)-1] = 0; ! argc -= 2; ! argv += 2; ! } else if (!strcmp(*argv, "-verbose")) { *************** *** 815,819 **** { sys_externalschedlib = 1; ! strcpy(sys_externalschedlibname, argv[1]); argv += 2; argc -= 2; --- 823,828 ---- { sys_externalschedlib = 1; ! strncpy(sys_externalschedlibname, argv[1], ! sizeof(sys_externalschedlibname) - 1); argv += 2; argc -= 2; *************** *** 822,826 **** { sys_extraflags = 1; ! strcpy(sys_extraflagsstring, argv[1]); argv += 2; argc -= 2; --- 831,836 ---- { sys_extraflags = 1; ! strncpy(sys_extraflagsstring, argv[1], ! sizeof(sys_extraflagsstring) - 1); argv += 2; argc -= 2;
Index: m_sched.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_sched.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** m_sched.c 28 Dec 2007 03:28:31 -0000 1.11 --- m_sched.c 28 Dec 2007 03:43:05 -0000 1.12 *************** *** 29,32 **** --- 29,37 ---- int sys_sleepgrain;
+ void sched_reopenmeplease(void) /* request from s_audio for deferred reopen */ + { + sys_quit = SYS_QUIT_RESTART; + } + typedef void (*t_clockmethod)(void *client);
*************** *** 287,291 **** if (sched_meterson) { ! float inmax, outmax; sys_getmeters(&inmax, &outmax); indb = 0.5 + rmstodb(inmax); --- 292,296 ---- if (sched_meterson) { ! t_sample inmax, outmax; sys_getmeters(&inmax, &outmax); indb = 0.5 + rmstodb(inmax); *************** *** 312,316 **** }
! void glob_meters(void *dummy, float f) { if (f == 0) --- 317,321 ---- }
! void glob_meters(void *dummy, t_float f) { if (f == 0) *************** *** 343,350 **** sched_referencelogicaltime = clock_getlogicaltime(); } ! if (flag == SCHED_AUDIO_CALLBACK && sched_useaudio != SCHED_AUDIO_CALLBACK) sys_quit = SYS_QUIT_RESTART; ! if (flag != SCHED_AUDIO_CALLBACK && sched_useaudio == SCHED_AUDIO_CALLBACK) ! post("sorry, can't turn off callbacks yet; restart Pd"); /* not right yet! */
sys_time_per_dsp_tick = (TIMEUNITPERSEC) * --- 348,358 ---- sched_referencelogicaltime = clock_getlogicaltime(); } ! if (flag == SCHED_AUDIO_CALLBACK && ! sched_useaudio != SCHED_AUDIO_CALLBACK) sys_quit = SYS_QUIT_RESTART; ! if (flag != SCHED_AUDIO_CALLBACK && ! sched_useaudio == SCHED_AUDIO_CALLBACK) ! post("sorry, can't turn off callbacks yet; restart Pd"); ! /* not right yet! */
sys_time_per_dsp_tick = (TIMEUNITPERSEC) * *************** *** 530,534 **** { sys_initmidiqueue(); ! while (1) { #ifdef MSW --- 538,542 ---- { sys_initmidiqueue(); ! while (!sys_quit) { #ifdef MSW
Index: d_soundfile.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** d_soundfile.c 20 Jul 2007 03:25:20 -0000 1.14 --- d_soundfile.c 28 Dec 2007 03:43:03 -0000 1.15 *************** *** 426,430 **** }
! static void soundfile_xferin(int sfchannels, int nvecs, float **vecs, long itemsread, unsigned char *buf, int nitems, int bytespersamp, int bigendian, int spread) --- 426,430 ---- }
! static void soundfile_xferin_sample(int sfchannels, int nvecs, t_sample **vecs, long itemsread, unsigned char *buf, int nitems, int bytespersamp, int bigendian, int spread) *************** *** 432,436 **** int i, j; unsigned char *sp, *sp2; ! float *fp; int nchannels = (sfchannels < nvecs ? sfchannels : nvecs); int bytesperframe = bytespersamp * sfchannels; --- 432,504 ---- int i, j; unsigned char *sp, *sp2; ! t_sample *fp; ! int nchannels = (sfchannels < nvecs ? sfchannels : nvecs); ! int bytesperframe = bytespersamp * sfchannels; ! for (i = 0, sp = buf; i < nchannels; i++, sp += bytespersamp) ! { ! if (bytespersamp == 2) ! { ! if (bigendian) ! { ! for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! *fp = SCALE * ((sp2[0] << 24) | (sp2[1] << 16)); ! } ! else ! { ! for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! *fp = SCALE * ((sp2[1] << 24) | (sp2[0] << 16)); ! } ! } ! else if (bytespersamp == 3) ! { ! if (bigendian) ! { ! for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! *fp = SCALE * ((sp2[0] << 24) | (sp2[1] << 16) ! | (sp2[2] << 8)); ! } ! else ! { ! for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! *fp = SCALE * ((sp2[2] << 24) | (sp2[1] << 16) ! | (sp2[0] << 8)); ! } ! } ! else if (bytespersamp == 4) ! { ! if (bigendian) ! { ! for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! *(long *)fp = ((sp2[0] << 24) | (sp2[1] << 16) ! | (sp2[2] << 8) | sp2[3]); ! } ! else ! { ! for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! *(long *)fp = ((sp2[3] << 24) | (sp2[2] << 16) ! | (sp2[1] << 8) | sp2[0]); ! } ! } ! } ! /* zero out other outputs */ ! for (i = sfchannels; i < nvecs; i++) ! for (j = nitems, fp = vecs[i]; j--; ) ! *fp++ = 0; ! ! } ! ! static void soundfile_xferin_float(int sfchannels, int nvecs, t_float **vecs, ! long itemsread, unsigned char *buf, int nitems, int bytespersamp, ! int bigendian, int spread) ! { ! int i, j; ! unsigned char *sp, *sp2; ! t_float *fp; int nchannels = (sfchannels < nvecs ? sfchannels : nvecs); int bytesperframe = bytespersamp * sfchannels; *************** *** 519,523 **** t_symbol **p_filesym, int *p_filetype, int *p_bytespersamp, int *p_swap, int *p_bigendian, ! int *p_normalize, long *p_onset, long *p_nframes, float *p_rate) { int argc = *p_argc; --- 587,591 ---- t_symbol **p_filesym, int *p_filetype, int *p_bytespersamp, int *p_swap, int *p_bigendian, ! int *p_normalize, long *p_onset, long *p_nframes, t_float *p_rate) { int argc = *p_argc; *************** *** 527,531 **** long onset = 0, nframes = 0x7fffffff; t_symbol *filesym; ! float rate = -1;
while (argc > 0 && argv->a_type == A_SYMBOL && --- 595,599 ---- long onset = 0, nframes = 0x7fffffff; t_symbol *filesym; ! t_float rate = -1;
while (argc > 0 && argv->a_type == A_SYMBOL && *************** *** 669,673 **** static int create_soundfile(t_canvas *canvas, const char *filename, int filetype, int nframes, int bytespersamp, ! int bigendian, int nchannels, int swap, float samplerate) { char filenamebuf[MAXPDSTRING], buf2[MAXPDSTRING]; --- 737,741 ---- static int create_soundfile(t_canvas *canvas, const char *filename, int filetype, int nframes, int bytespersamp, ! int bigendian, int nchannels, int swap, t_float samplerate) { char filenamebuf[MAXPDSTRING], buf2[MAXPDSTRING]; *************** *** 828,838 **** }
! static void soundfile_xferout(int nchannels, float **vecs, unsigned char *buf, int nitems, long onset, int bytespersamp, ! int bigendian, float normalfactor, int spread) { int i, j; unsigned char *sp, *sp2; ! float *fp; int bytesperframe = bytespersamp * nchannels; long xx; --- 896,906 ---- }
! static void soundfile_xferout_sample(int nchannels, t_sample **vecs, unsigned char *buf, int nitems, long onset, int bytespersamp, ! int bigendian, t_sample normalfactor, int spread) { int i, j; unsigned char *sp, *sp2; ! t_sample *fp; int bytesperframe = bytespersamp * nchannels; long xx; *************** *** 841,845 **** if (bytespersamp == 2) { ! float ff = normalfactor * 32768.; if (bigendian) { --- 909,913 ---- if (bytespersamp == 2) { ! t_sample ff = normalfactor * 32768.; if (bigendian) { *************** *** 875,879 **** else if (bytespersamp == 3) { ! float ff = normalfactor * 8388608.; if (bigendian) { --- 943,947 ---- else if (bytespersamp == 3) { ! t_sample ff = normalfactor * 8388608.; if (bigendian) { *************** *** 916,920 **** j < nitems; j++, sp2 += bytesperframe, fp += spread) { ! float f2 = *fp * normalfactor; xx = *(long *)&f2; sp2[0] = (xx >> 24); sp2[1] = (xx >> 16); --- 984,988 ---- j < nitems; j++, sp2 += bytesperframe, fp += spread) { ! t_sample f2 = *fp * normalfactor; xx = *(long *)&f2; sp2[0] = (xx >> 24); sp2[1] = (xx >> 16); *************** *** 927,931 **** j < nitems; j++, sp2 += bytesperframe, fp += spread) { ! float f2 = *fp * normalfactor; xx = *(long *)&f2; sp2[3] = (xx >> 24); sp2[2] = (xx >> 16); --- 995,1107 ---- j < nitems; j++, sp2 += bytesperframe, fp += spread) { ! t_sample f2 = *fp * normalfactor; ! xx = *(long *)&f2; ! sp2[3] = (xx >> 24); sp2[2] = (xx >> 16); ! sp2[1] = (xx >> 8); sp2[0] = xx; ! } ! } ! } ! } ! } ! static void soundfile_xferout_float(int nchannels, t_float **vecs, ! unsigned char *buf, int nitems, long onset, int bytespersamp, ! int bigendian, t_sample normalfactor, int spread) ! { ! int i, j; ! unsigned char *sp, *sp2; ! t_float *fp; ! int bytesperframe = bytespersamp * nchannels; ! long xx; ! for (i = 0, sp = buf; i < nchannels; i++, sp += bytespersamp) ! { ! if (bytespersamp == 2) ! { ! t_sample ff = normalfactor * 32768.; ! if (bigendian) ! { ! for (j = 0, sp2 = sp, fp = vecs[i] + onset; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! { ! int xx = 32768. + (*fp * ff); ! xx -= 32768; ! if (xx < -32767) ! xx = -32767; ! if (xx > 32767) ! xx = 32767; ! sp2[0] = (xx >> 8); ! sp2[1] = xx; ! } ! } ! else ! { ! for (j = 0, sp2 = sp, fp=vecs[i] + onset; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! { ! int xx = 32768. + (*fp * ff); ! xx -= 32768; ! if (xx < -32767) ! xx = -32767; ! if (xx > 32767) ! xx = 32767; ! sp2[1] = (xx >> 8); ! sp2[0] = xx; ! } ! } ! } ! else if (bytespersamp == 3) ! { ! t_sample ff = normalfactor * 8388608.; ! if (bigendian) ! { ! for (j = 0, sp2 = sp, fp=vecs[i] + onset; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! { ! int xx = 8388608. + (*fp * ff); ! xx -= 8388608; ! if (xx < -8388607) ! xx = -8388607; ! if (xx > 8388607) ! xx = 8388607; ! sp2[0] = (xx >> 16); ! sp2[1] = (xx >> 8); ! sp2[2] = xx; ! } ! } ! else ! { ! for (j = 0, sp2 = sp, fp=vecs[i] + onset; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! { ! int xx = 8388608. + (*fp * ff); ! xx -= 8388608; ! if (xx < -8388607) ! xx = -8388607; ! if (xx > 8388607) ! xx = 8388607; ! sp2[2] = (xx >> 16); ! sp2[1] = (xx >> 8); ! sp2[0] = xx; ! } ! } ! } ! else if (bytespersamp == 4) ! { ! if (bigendian) ! { ! for (j = 0, sp2 = sp, fp=vecs[i] + onset; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! { ! t_sample f2 = *fp * normalfactor; ! xx = *(long *)&f2; ! sp2[0] = (xx >> 24); sp2[1] = (xx >> 16); ! sp2[2] = (xx >> 8); sp2[3] = xx; ! } ! } ! else ! { ! for (j = 0, sp2 = sp, fp=vecs[i] + onset; ! j < nitems; j++, sp2 += bytesperframe, fp += spread) ! { ! t_sample f2 = *fp * normalfactor; xx = *(long *)&f2; sp2[3] = (xx >> 24); sp2[2] = (xx >> 16); *************** *** 936,940 **** } } -
/* ------- soundfiler - reads and writes soundfiles to/from "garrays" ---- */ --- 1112,1115 ---- *************** *** 1122,1128 **** nitems = fread(sampbuf, channels * bytespersamp, thisread, fp); if (nitems <= 0) break; ! soundfile_xferin(channels, argc, (float **)vecs, itemsread, (unsigned char *)sampbuf, nitems, bytespersamp, bigendian, ! sizeof(t_word)/sizeof(float)); itemsread += nitems; } --- 1297,1303 ---- nitems = fread(sampbuf, channels * bytespersamp, thisread, fp); if (nitems <= 0) break; ! soundfile_xferin_float(channels, argc, (t_float **)vecs, itemsread, (unsigned char *)sampbuf, nitems, bytespersamp, bigendian, ! sizeof(t_word)/sizeof(t_sample)); itemsread += nitems; } *************** *** 1158,1162 **** if (fd >= 0) close (fd); ! outlet_float(x->x_obj.ob_outlet, (float)itemsread); }
--- 1333,1337 ---- if (fd >= 0) close (fd); ! outlet_float(x->x_obj.ob_outlet, (t_float)itemsread); }
*************** *** 1176,1180 **** int bufframes, nitems; int fd = -1; ! float normfactor, biggest = 0, samplerate; t_symbol *filesym;
--- 1351,1356 ---- int bufframes, nitems; int fd = -1; ! t_sample normfactor, biggest = 0; ! t_float samplerate; t_symbol *filesym;
*************** *** 1245,1251 **** int thiswrite = nframes - itemswritten, nitems, nbytes; thiswrite = (thiswrite > bufframes ? bufframes : thiswrite); ! soundfile_xferout(argc, (t_float **)vecs, (unsigned char *)sampbuf, thiswrite, onset, bytespersamp, bigendian, normfactor, ! sizeof(t_word)/sizeof(float)); nbytes = write(fd, sampbuf, nchannels * bytespersamp * thiswrite); if (nbytes < nchannels * bytespersamp * thiswrite) --- 1421,1427 ---- int thiswrite = nframes - itemswritten, nitems, nbytes; thiswrite = (thiswrite > bufframes ? bufframes : thiswrite); ! soundfile_xferout_float(argc, (t_float **)vecs, (unsigned char *)sampbuf, thiswrite, onset, bytespersamp, bigendian, normfactor, ! sizeof(t_word)/sizeof(t_sample)); nbytes = write(fd, sampbuf, nchannels * bytespersamp * thiswrite); if (nbytes < nchannels * bytespersamp * thiswrite) *************** *** 1257,1261 **** } itemswritten += thiswrite; ! onset += thiswrite; } if (fd >= 0) --- 1433,1437 ---- } itemswritten += thiswrite; ! onset += thiswrite * (sizeof(t_word)/sizeof(float)); } if (fd >= 0) *************** *** 1282,1286 **** long bozo = soundfiler_dowrite(x, x->x_canvas, argc, argv); ! outlet_float(x->x_obj.ob_outlet, (float)bozo); }
--- 1458,1462 ---- long bozo = soundfiler_dowrite(x, x->x_canvas, argc, argv); ! outlet_float(x->x_obj.ob_outlet, (t_float)bozo); }
*************** *** 1344,1348 **** t_outlet *x_bangout; /* bang-on-done outlet */ int x_state; /* opened, running, or idle */ ! float x_insamplerate; /* sample rate of input signal if known */ /* parameters to communicate with subthread */ int x_requestcode; /* pending request from parent to I/O thread */ --- 1520,1524 ---- t_outlet *x_bangout; /* bang-on-done outlet */ int x_state; /* opened, running, or idle */ ! t_float x_insamplerate; /* sample rate of input signal if known */ /* parameters to communicate with subthread */ int x_requestcode; /* pending request from parent to I/O thread */ *************** *** 1353,1357 **** int x_bigendian; /* true if file is big-endian */ int x_sfchannels; /* number of channels in soundfile */ ! float x_samplerate; /* sample rate of soundfile */ long x_onsetframes; /* number of sample frames to skip */ long x_bytelimit; /* max number of data bytes to read */ --- 1529,1533 ---- int x_bigendian; /* true if file is big-endian */ int x_sfchannels; /* number of channels in soundfile */ ! t_float x_samplerate; /* sample rate of soundfile */ long x_onsetframes; /* number of sample frames to skip */ long x_bytelimit; /* max number of data bytes to read */ *************** *** 1366,1370 **** int x_itemswritten; /* writesf~ only; items writen */ int x_swap; /* writesf~ only; true if byte swapping */ ! float x_f; /* writesf~ only; scalar for signal inlet */ pthread_mutex_t x_mutex; pthread_cond_t x_requestcondition; --- 1542,1546 ---- int x_itemswritten; /* writesf~ only; items writen */ int x_swap; /* writesf~ only; true if byte swapping */ ! t_float x_f; /* writesf~ only; scalar for signal inlet */ pthread_mutex_t x_mutex; pthread_cond_t x_requestcondition; *************** *** 1745,1749 **** bytespersample = x->x_bytespersample, bigendian = x->x_bigendian; ! float *fp; if (x->x_state == STATE_STREAM) { --- 1921,1925 ---- bytespersample = x->x_bytespersample, bigendian = x->x_bigendian; ! t_sample *fp; if (x->x_state == STATE_STREAM) { *************** *** 1789,1793 **** if (xfersize) { ! soundfile_xferin(sfchannels, noutlets, x->x_outvec, 0, (unsigned char *)(x->x_buf + x->x_fifotail), xfersize, bytespersample, bigendian, 1); --- 1965,1969 ---- if (xfersize) { ! soundfile_xferin_sample(sfchannels, noutlets, x->x_outvec, 0, (unsigned char *)(x->x_buf + x->x_fifotail), xfersize, bytespersample, bigendian, 1); *************** *** 1804,1808 **** }
! soundfile_xferin(sfchannels, noutlets, x->x_outvec, 0, (unsigned char *)(x->x_buf + x->x_fifotail), vecsize, bytespersample, bigendian, 1); --- 1980,1984 ---- }
! soundfile_xferin_sample(sfchannels, noutlets, x->x_outvec, 0, (unsigned char *)(x->x_buf + x->x_fifotail), vecsize, bytespersample, bigendian, 1); *************** *** 2000,2004 **** char *filename = x->x_filename; t_canvas *canvas = x->x_canvas; ! float samplerate = x->x_samplerate;
/* alter the request code so that an ensuing "open" will get --- 2176,2180 ---- char *filename = x->x_filename; t_canvas *canvas = x->x_canvas; ! t_float samplerate = x->x_samplerate;
/* alter the request code so that an ensuing "open" will get *************** *** 2245,2249 **** bytespersample = x->x_bytespersample, bigendian = x->x_bigendian; ! float *fp; if (x->x_state == STATE_STREAM) { --- 2421,2425 ---- bytespersample = x->x_bytespersample, bigendian = x->x_bigendian; ! t_sample *fp; if (x->x_state == STATE_STREAM) { *************** *** 2264,2268 **** }
! soundfile_xferout(sfchannels, x->x_outvec, (unsigned char *)(x->x_buf + x->x_fifohead), vecsize, 0, bytespersample, bigendian, 1., 1); --- 2440,2444 ---- }
! soundfile_xferout_sample(sfchannels, x->x_outvec, (unsigned char *)(x->x_buf + x->x_fifohead), vecsize, 0, bytespersample, bigendian, 1., 1); *************** *** 2317,2321 **** int filetype, bytespersamp, swap, bigendian, normalize; long onset, nframes; ! float samplerate; if (x->x_state != STATE_IDLE) { --- 2493,2497 ---- int filetype, bytespersamp, swap, bigendian, normalize; long onset, nframes; ! t_float samplerate; if (x->x_state != STATE_IDLE) {
Index: m_binbuf.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_binbuf.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** m_binbuf.c 20 Jul 2007 03:25:20 -0000 1.14 --- m_binbuf.c 28 Dec 2007 03:43:04 -0000 1.15 *************** *** 388,394 **** }
- - #define MSTACKSIZE 10000 /* FIXME -- make this grow as needed */ - void binbuf_print(t_binbuf *x) { --- 388,391 ---- *************** *** 532,542 **** }
void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv) { ! static t_atom mstack[MSTACKSIZE], *msp = mstack, *ems = mstack+MSTACKSIZE; ! t_atom *stackwas = msp; t_atom *at = x->b_vec; int ac = x->b_n; ! int nargs; while (1) { --- 529,596 ---- }
+ #define SMALLMSG 5 + #define HUGEMSG 1000 + #ifdef MSW + #include <malloc.h> + #else + #include <alloca.h> + #endif + #if HAVE_ALLOCA + #define ATOMS_ALLOCA(x, n) ((x) = (t_atom *)((n) < HUGEMSG ? \ + alloca((n) * sizeof(t_atom)) : getbytes((n) * sizeof(t_atom)))) + #define ATOMS_FREEA(x, n) ( \ + ((n) < HUGEMSG || (freebytes((x), (n) * sizeof(t_atom)), 0))) + #else + #define ATOMS_ALLOCA(x, n) ((x) = (t_atom *)getbytes((n) * sizeof(t_atom))) + #define ATOMS_FREEA(x, n) (freebytes((x), (n) * sizeof(t_atom))) + #endif + void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv) { ! t_atom smallstack[SMALLMSG], *mstack, *msp; t_atom *at = x->b_vec; int ac = x->b_n; ! int nargs, maxnargs = 0; ! if (ac <= SMALLMSG) ! mstack = smallstack; ! else ! { ! #if 1 ! /* count number of args in biggest message. The wierd ! treatment of "pd_objectmaker" is because when the message ! goes out to objectmaker, commas and semis are passed ! on as regular args (see below). We're tacitly assuming here ! that the pd_objectmaker target can't come up via a named ! destination in the message, only because the original "target" ! points there. */ ! if (target == &pd_objectmaker) ! maxnargs = ac; ! else ! { ! int i, j = (target ? 0 : -1); ! for (i = 0; i < ac; i++) ! { ! if (at[i].a_type == A_SEMI) ! j = -1; ! else if (at[i].a_type == A_COMMA) ! j = 0; ! else if (++j > maxnargs) ! maxnargs = j; ! } ! } ! if (maxnargs <= SMALLMSG) ! mstack = smallstack; ! else ATOMS_ALLOCA(mstack, maxnargs); ! #else ! /* just pessimistically allocate enough to hold everything ! at once. This turned out to run slower in a simple benchmark ! I tried, perhaps because the extra memory allocation ! hurt the cache hit rate. */ ! maxnargs = ac; ! ATOMS_ALLOCA(mstack, maxnargs); ! #endif ! ! } ! msp = mstack; while (1) { *************** *** 598,606 **** t_symbol *s9; if (!ac) goto gotmess; - if (msp >= ems) - { - error("message stack overflow"); - goto broken; - } switch (at->a_type) { --- 652,655 ---- *************** *** 668,683 **** if (nargs) { ! switch (stackwas->a_type) { case A_SYMBOL: ! typedmess(target, stackwas->a_w.w_symbol, nargs-1, stackwas+1); break; case A_FLOAT: ! if (nargs == 1) pd_float(target, stackwas->a_w.w_float); ! else pd_list(target, 0, nargs, stackwas); break; } } ! msp = stackwas; if (!ac) break; target = nexttarget; --- 717,732 ---- if (nargs) { ! switch (mstack->a_type) { case A_SYMBOL: ! typedmess(target, mstack->a_w.w_symbol, nargs-1, mstack+1); break; case A_FLOAT: ! if (nargs == 1) pd_float(target, mstack->a_w.w_float); ! else pd_list(target, 0, nargs, mstack); break; } } ! msp = mstack; if (!ac) break; target = nexttarget; *************** *** 685,692 **** ac--; } ! ! return; ! broken: ! msp = stackwas; }
--- 734,740 ---- ac--; } ! broken: ! if (maxnargs > SMALLMSG) ! ATOMS_FREEA(mstack, maxnargs); }
*************** *** 960,964 **** atom_getfloatarg(5, natom, nextmess) - atom_getfloatarg(3, natom, nextmess), ! (float)sys_defaultfont); } } --- 1008,1012 ---- atom_getfloatarg(5, natom, nextmess) - atom_getfloatarg(3, natom, nextmess), ! (t_float)sys_defaultfont); } } *************** *** 1043,1047 **** else if (!strcmp(second, "slider")) { ! float inc = atom_getfloatarg(7, natom, nextmess); if (inc <= 0) inc = 1; --- 1091,1095 ---- else if (!strcmp(second, "slider")) { ! t_float inc = atom_getfloatarg(7, natom, nextmess); if (inc <= 0) inc = 1;
Index: d_fft_fftsg.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_fft_fftsg.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** d_fft_fftsg.c 29 Jul 2007 20:17:07 -0000 1.2 --- d_fft_fftsg.c 28 Dec 2007 03:43:03 -0000 1.3 *************** *** 72,85 **** }
! EXTERN void mayer_fht(float *fz, int n) { post("FHT: not yet implemented"); }
! EXTERN void mayer_dofft(float *fz1, float *fz2, int n, int sgn) { FFTFLT *buf, *fp3; int i; ! float *fp1, *fp2; buf = alloca(n * (2 * sizeof(FFTFLT))); if (!ooura_init(n)) --- 72,85 ---- }
! EXTERN void mayer_fht(t_sample *fz, int n) { post("FHT: not yet implemented"); }
! EXTERN void mayer_dofft(t_sample *fz1, t_sample *fz2, int n, int sgn) { FFTFLT *buf, *fp3; int i; ! t_sample *fp1, *fp2; buf = alloca(n * (2 * sizeof(FFTFLT))); if (!ooura_init(n)) *************** *** 100,118 **** }
! EXTERN void mayer_fft(int n, float *fz1, float *fz2) { mayer_dofft(fz1, fz2, n, -1); }
! EXTERN void mayer_ifft(int n, float *fz1, float *fz2) { mayer_dofft(fz1, fz2, n, 1); }
! EXTERN void mayer_realfft(int n, float *fz) { FFTFLT *buf, *fp3; int i, nover2 = n/2; ! float *fp1, *fp2; buf = alloca(n * sizeof(FFTFLT)); if (!ooura_init(n)) --- 100,118 ---- }
! EXTERN void mayer_fft(int n, t_sample *fz1, t_sample *fz2) { mayer_dofft(fz1, fz2, n, -1); }
! EXTERN void mayer_ifft(int n, t_sample *fz1, t_sample *fz2) { mayer_dofft(fz1, fz2, n, 1); }
! EXTERN void mayer_realfft(int n, t_sample *fz) { FFTFLT *buf, *fp3; int i, nover2 = n/2; ! t_sample *fp1, *fp2; buf = alloca(n * sizeof(FFTFLT)); if (!ooura_init(n)) *************** *** 128,136 **** }
! EXTERN void mayer_realifft(int n, float *fz) { FFTFLT *buf, *fp3; int i, nover2 = n/2; ! float *fp1, *fp2; buf = alloca(n * sizeof(FFTFLT)); if (!ooura_init(n)) --- 128,136 ---- }
! EXTERN void mayer_realifft(int n, t_sample *fz) { FFTFLT *buf, *fp3; int i, nover2 = n/2; ! t_sample *fp1, *fp2; buf = alloca(n * sizeof(FFTFLT)); if (!ooura_init(n))
Index: s_audio_jack.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_jack.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** s_audio_jack.c 2 Aug 2007 00:33:50 -0000 1.8 --- s_audio_jack.c 28 Dec 2007 03:43:05 -0000 1.9 *************** *** 19,24 **** #define JACK_OUT_MAX 64 static jack_nframes_t jack_filled = 0; ! static float jack_outbuf[NUM_JACK_PORTS*BUF_JACK]; ! static float jack_inbuf[NUM_JACK_PORTS*BUF_JACK]; static int jack_started = 0;
--- 19,24 ---- #define JACK_OUT_MAX 64 static jack_nframes_t jack_filled = 0; ! static t_sample jack_outbuf[NUM_JACK_PORTS*BUF_JACK]; ! static t_sample jack_inbuf[NUM_JACK_PORTS*BUF_JACK]; static int jack_started = 0;
*************** *** 40,46 **** { int j; ! float *out; ! float *in; !
if (nframes > JACK_OUT_MAX) jack_out_max = nframes; --- 40,44 ---- { int j; ! jack_default_audio_sample_t *out, *in;
if (nframes > JACK_OUT_MAX) jack_out_max = nframes; *************** *** 48,59 **** if (jack_filled >= nframes) { if (jack_filled != nframes) fprintf(stderr,"Partial read"); ! ! for (j = 0; j < sys_outchannels; j++) { out = jack_port_get_buffer (output_port[j], nframes); ! memcpy(out, jack_outbuf + (j * BUF_JACK), sizeof (float) * nframes); ! } ! for (j = 0; j < sys_inchannels; j++) { in = jack_port_get_buffer( input_port[j], nframes); ! memcpy(jack_inbuf + (j * BUF_JACK), in, sizeof (float) * nframes); } jack_filled -= nframes; --- 46,79 ---- if (jack_filled >= nframes) { if (jack_filled != nframes) fprintf(stderr,"Partial read"); ! /* hmm, how to find out whether 't_sample' and 'jack_default_audio_sample_t' are actually the same type??? */ ! if(sizeof(t_sample)==sizeof(jack_default_audio_sample_t)) ! { ! for (j = 0; j < sys_outchannels; j++) { out = jack_port_get_buffer (output_port[j], nframes); ! memcpy(out, jack_outbuf + (j * BUF_JACK), sizeof (jack_default_audio_sample_t) * nframes); ! } ! for (j = 0; j < sys_inchannels; j++) { in = jack_port_get_buffer( input_port[j], nframes); ! memcpy(jack_inbuf + (j * BUF_JACK), in, sizeof (jack_default_audio_sample_t) * nframes); ! } ! } ! else ! { ! unsigned int frame=0; ! t_sample*data; ! for (j = 0; j < sys_outchannels; j++) { ! out = jack_port_get_buffer (output_port[j], nframes); ! data=jack_outbuf + (j * BUF_JACK); ! for(frame=0; frame<nframes; frame++) { ! *out++=*data++; ! } ! } ! for (j = 0; j < sys_inchannels; j++) { ! in = jack_port_get_buffer( input_port[j], nframes); ! data=jack_inbuf+(j*BUF_JACK); ! for(frame=0; frame<nframes; frame++) { ! *data++=*in++; ! } ! } } jack_filled -= nframes; *************** *** 323,327 ****
{ ! float * fp; int j; int rtnval = SENDDACS_YES; --- 343,347 ----
{ ! t_sample * fp; int j; int rtnval = SENDDACS_YES; *************** *** 344,353 **** fp = sys_soundout; for (j = 0; j < sys_outchannels; j++) { ! memcpy(jack_outbuf + (j * BUF_JACK) + jack_filled,fp, DEFDACBLKSIZE*sizeof(float)); fp += DEFDACBLKSIZE; } fp = sys_soundin; for (j = 0; j < sys_inchannels; j++) { ! memcpy(fp, jack_inbuf + (j * BUF_JACK) + jack_filled, DEFDACBLKSIZE*sizeof(float)); fp += DEFDACBLKSIZE; } --- 364,373 ---- fp = sys_soundout; for (j = 0; j < sys_outchannels; j++) { ! memcpy(jack_outbuf + (j * BUF_JACK) + jack_filled,fp, DEFDACBLKSIZE*sizeof(t_sample)); fp += DEFDACBLKSIZE; } fp = sys_soundin; for (j = 0; j < sys_inchannels; j++) { ! memcpy(fp, jack_inbuf + (j * BUF_JACK) + jack_filled, DEFDACBLKSIZE*sizeof(t_sample)); fp += DEFDACBLKSIZE; } *************** *** 358,362 **** }
! memset(sys_soundout,0,DEFDACBLKSIZE*sizeof(float)*sys_outchannels); jack_filled += DEFDACBLKSIZE; return rtnval; --- 378,382 ---- }
! memset(sys_soundout,0,DEFDACBLKSIZE*sizeof(t_sample)*sys_outchannels); jack_filled += DEFDACBLKSIZE; return rtnval;
Index: m_obj.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_obj.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** m_obj.c 20 Jan 2007 04:06:06 -0000 1.5 --- m_obj.c 28 Dec 2007 03:43:05 -0000 1.6 *************** *** 16,20 **** t_float *iu_floatslot; t_symbol **iu_symslot; ! t_sample iu_floatsignalvalue; };
--- 16,20 ---- t_float *iu_floatslot; t_symbol **iu_symslot; ! t_float iu_floatsignalvalue; };
*************** *** 661,665 **** }
! t_sample *obj_findsignalscalar(t_object *x, int m) { int n = 0; --- 661,665 ---- }
! t_float *obj_findsignalscalar(t_object *x, int m) { int n = 0; *************** *** 669,673 **** if (!m--) return (x->ob_pd->c_floatsignalin > 0 ? ! (t_sample *)(((char *)x) + x->ob_pd->c_floatsignalin) : 0); n++; } --- 669,673 ---- if (!m--) return (x->ob_pd->c_floatsignalin > 0 ? ! (t_float *)(((char *)x) + x->ob_pd->c_floatsignalin) : 0); n++; }
Index: g_template.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_template.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** g_template.c 20 Jul 2007 03:25:20 -0000 1.19 --- g_template.c 28 Dec 2007 03:43:04 -0000 1.20 *************** *** 148,152 **** int onset, type; t_symbol *arraytype; ! float val = 0; if (template_find_field(x, fieldname, &onset, &type, &arraytype)) { --- 148,152 ---- int onset, type; t_symbol *arraytype; ! t_float val = 0; if (template_find_field(x, fieldname, &onset, &type, &arraytype)) { *************** *** 722,733 **** t_symbol *fd_varsym; /* the field is variable and this is the name */ } fd_un; ! float fd_v1; /* min and max values */ ! float fd_v2; ! float fd_screen1; /* min and max screen values */ ! float fd_screen2; ! float fd_quantum; /* quantization in value */ };
! static void fielddesc_setfloat_const(t_fielddesc *fd, float f) { fd->fd_type = A_FLOAT; --- 722,733 ---- t_symbol *fd_varsym; /* the field is variable and this is the name */ } fd_un; ! t_float fd_v1; /* min and max values */ ! t_float fd_v2; ! t_float fd_screen1; /* min and max screen values */ ! t_float fd_screen2; ! t_float fd_quantum; /* quantization in value */ };
! static void fielddesc_setfloat_const(t_fielddesc *fd, t_float f) { fd->fd_type = A_FLOAT; *************** *** 852,858 ****
/* convert a variable's value to a screen coordinate via its fielddesc */ ! t_float fielddesc_cvttocoord(t_fielddesc *f, float val) { ! float coord, pix, extreme, div; if (f->fd_v2 == f->fd_v1) return (val); --- 852,858 ----
/* convert a variable's value to a screen coordinate via its fielddesc */ ! t_float fielddesc_cvttocoord(t_fielddesc *f, t_float val) { ! t_float coord, pix, extreme, div; if (f->fd_v2 == f->fd_v1) return (val); *************** *** 878,882 **** if (f->fd_var) { ! float val = template_getfloat(template, f->fd_un.fd_varsym, wp, loud); return (fielddesc_cvttocoord(f, val)); --- 878,882 ---- if (f->fd_var) { ! t_float val = template_getfloat(template, f->fd_un.fd_varsym, wp, loud); return (fielddesc_cvttocoord(f, val)); *************** *** 910,922 ****
/* convert from a screen coordinate to a variable value */ ! float fielddesc_cvtfromcoord(t_fielddesc *f, float coord) { ! float val; if (f->fd_screen2 == f->fd_screen1) val = coord; else { ! float div = (f->fd_v2 - f->fd_v1)/(f->fd_screen2 - f->fd_screen1); ! float extreme; val = f->fd_v1 + (coord - f->fd_screen1) * div; if (f->fd_quantum != 0) --- 910,922 ----
/* convert from a screen coordinate to a variable value */ ! t_float fielddesc_cvtfromcoord(t_fielddesc *f, t_float coord) { ! t_float val; if (f->fd_screen2 == f->fd_screen1) val = coord; else { ! t_float div = (f->fd_v2 - f->fd_v1)/(f->fd_screen2 - f->fd_screen1); ! t_float extreme; val = f->fd_v1 + (coord - f->fd_screen1) * div; if (f->fd_quantum != 0) *************** *** 933,941 ****
void fielddesc_setcoord(t_fielddesc *f, t_template *template, ! t_word *wp, float coord, int loud) { if (f->fd_type == A_FLOAT && f->fd_var) { ! float val = fielddesc_cvtfromcoord(f, coord); template_setfloat(template, f->fd_un.fd_varsym, wp, val, loud); --- 933,941 ----
void fielddesc_setcoord(t_fielddesc *f, t_template *template, ! t_word *wp, t_float coord, int loud) { if (f->fd_type == A_FLOAT && f->fd_var) { ! t_float val = fielddesc_cvtfromcoord(f, coord); template_setfloat(template, f->fd_un.fd_varsym, wp, val, loud); *************** *** 1041,1045 ****
static void curve_getrect(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int *xp1, int *yp1, int *xp2, int *yp2) { --- 1041,1045 ----
static void curve_getrect(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int *xp1, int *yp1, int *xp2, int *yp2) { *************** *** 1073,1077 ****
static void curve_displace(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int dx, int dy) { --- 1073,1077 ----
static void curve_displace(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int dx, int dy) { *************** *** 1080,1084 ****
static void curve_select(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int state) { --- 1080,1084 ----
static void curve_select(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int state) { *************** *** 1087,1091 ****
static void curve_activate(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int state) { --- 1087,1091 ----
static void curve_activate(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int state) { *************** *** 1123,1127 ****
static void curve_vis(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int vis) { --- 1123,1127 ----
static void curve_vis(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int vis) { *************** *** 1138,1142 **** { int flags = x->x_flags, closed = (flags & CLOSED); ! float width = fielddesc_getfloat(&x->x_width, template, data, 1); char outline[20], fill[20]; int pix[200]; --- 1138,1142 ---- { int flags = x->x_flags, closed = (flags & CLOSED); ! t_float width = fielddesc_getfloat(&x->x_width, template, data, 1); char outline[20], fill[20]; int pix[200]; *************** *** 1186,1195 ****
static int curve_motion_field; ! static float curve_motion_xcumulative; ! static float curve_motion_xbase; ! static float curve_motion_xper; ! static float curve_motion_ycumulative; ! static float curve_motion_ybase; ! static float curve_motion_yper; static t_glist *curve_motion_glist; static t_scalar *curve_motion_scalar; --- 1186,1195 ----
static int curve_motion_field; ! static t_float curve_motion_xcumulative; ! static t_float curve_motion_xbase; ! static t_float curve_motion_xper; ! static t_float curve_motion_ycumulative; ! static t_float curve_motion_ybase; ! static t_float curve_motion_yper; static t_glist *curve_motion_glist; static t_scalar *curve_motion_scalar; *************** *** 1238,1242 **** static int curve_click(t_gobj *z, t_glist *glist, t_word *data, t_template *template, t_scalar *sc, t_array *ap, ! float basex, float basey, int xpix, int ypix, int shift, int alt, int dbl, int doit) { --- 1238,1242 ---- static int curve_click(t_gobj *z, t_glist *glist, t_word *data, t_template *template, t_scalar *sc, t_array *ap, ! t_float basex, t_float basey, int xpix, int ypix, int shift, int alt, int dbl, int doit) { *************** *** 1439,1444 **** t_word *data, t_template *ownertemplate, t_symbol **elemtemplatesymp, t_array **arrayp, ! float *linewidthp, float *xlocp, float *xincp, float *ylocp, float *stylep, ! float *visp, float *scalarvisp, t_fielddesc **xfield, t_fielddesc **yfield, t_fielddesc **wfield) { --- 1439,1444 ---- t_word *data, t_template *ownertemplate, t_symbol **elemtemplatesymp, t_array **arrayp, ! t_float *linewidthp, t_float *xlocp, t_float *xincp, t_float *ylocp, t_float *stylep, ! t_float *visp, t_float *scalarvisp, t_fielddesc **xfield, t_fielddesc **yfield, t_fielddesc **wfield) { *************** *** 1539,1543 ****
static void plot_getrect(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int *xp1, int *yp1, int *xp2, int *yp2) { --- 1539,1543 ----
static void plot_getrect(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int *xp1, int *yp1, int *xp2, int *yp2) { *************** *** 1547,1555 **** t_template *elemtemplate; t_symbol *elemtemplatesym; ! float linewidth, xloc, xinc, yloc, style, xsum, yval, vis, scalarvis; t_array *array; int x1 = 0x7fffffff, y1 = 0x7fffffff, x2 = -0x7fffffff, y2 = -0x7fffffff; int i; ! float xpix, ypix, wpix; t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc; if (!plot_readownertemplate(x, data, template, --- 1547,1555 ---- t_template *elemtemplate; t_symbol *elemtemplatesym; ! t_float linewidth, xloc, xinc, yloc, style, xsum, yval, vis, scalarvis; t_array *array; int x1 = 0x7fffffff, y1 = 0x7fffffff, x2 = -0x7fffffff, y2 = -0x7fffffff; int i; ! t_float xpix, ypix, wpix; t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc; if (!plot_readownertemplate(x, data, template, *************** *** 1566,1570 **** for (i = 0, xsum = 0; i < array->a_n; i += incr) { ! float usexloc, useyloc; t_gobj *y; /* get the coords of the point proper */ --- 1566,1570 ---- for (i = 0, xsum = 0; i < array->a_n; i += incr) { ! t_float usexloc, useyloc; t_gobj *y; /* get the coords of the point proper */ *************** *** 1586,1594 **** if (xonset >= 0) usexloc = basex + xloc + fielddesc_cvttocoord(xfielddesc, ! *(float *)(((char *)(array->a_vec) + elemsize * i) + xonset)); else usexloc = basex + xsum, xsum += xinc; if (yonset >= 0) ! yval = *(float *)(((char *)(array->a_vec) + elemsize * i) + yonset); else yval = 0; --- 1586,1594 ---- if (xonset >= 0) usexloc = basex + xloc + fielddesc_cvttocoord(xfielddesc, ! *(t_float *)(((char *)(array->a_vec) + elemsize * i) + xonset)); else usexloc = basex + xsum, xsum += xinc; if (yonset >= 0) ! yval = *(t_float *)(((char *)(array->a_vec) + elemsize * i) + yonset); else yval = 0; *************** *** 1623,1627 ****
static void plot_displace(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int dx, int dy) { --- 1623,1627 ----
static void plot_displace(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int dx, int dy) { *************** *** 1630,1634 ****
static void plot_select(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int state) { --- 1630,1634 ----
static void plot_select(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int state) { *************** *** 1637,1641 ****
static void plot_activate(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int state) { --- 1637,1641 ----
static void plot_activate(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int state) { *************** *** 1644,1648 ****
static void plot_vis(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int tovis) { --- 1644,1648 ----
static void plot_vis(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int tovis) { *************** *** 1652,1656 **** t_template *elemtemplate; t_symbol *elemtemplatesym; ! float linewidth, xloc, xinc, yloc, style, usexloc, xsum, yval, vis, scalarvis; t_array *array; --- 1652,1656 ---- t_template *elemtemplate; t_symbol *elemtemplatesym; ! t_float linewidth, xloc, xinc, yloc, style, usexloc, xsum, yval, vis, scalarvis; t_array *array; *************** *** 1682,1690 **** if (style == PLOTSTYLE_POINTS) { ! float minyval = 1e20, maxyval = -1e20; int ndrawn = 0; for (xsum = basex + xloc, i = 0; i < nelem; i++) { ! float yval, xpix, ypix, nextxloc; int ixpix, inextx;
--- 1682,1690 ---- if (style == PLOTSTYLE_POINTS) { ! t_float minyval = 1e20, maxyval = -1e20; int ndrawn = 0; for (xsum = basex + xloc, i = 0; i < nelem; i++) { ! t_float yval, xpix, ypix, nextxloc; int ixpix, inextx;
*************** *** 1692,1696 **** { usexloc = basex + xloc + ! *(float *)((elem + elemsize * i) + xonset); ixpix = glist_xtopixels(glist, fielddesc_cvttocoord(xfielddesc, usexloc)); --- 1692,1696 ---- { usexloc = basex + xloc + ! *(t_float *)((elem + elemsize * i) + xonset); ixpix = glist_xtopixels(glist, fielddesc_cvttocoord(xfielddesc, usexloc)); *************** *** 1708,1712 ****
if (yonset >= 0) ! yval = yloc + *(float *)((elem + elemsize * i) + yonset); else yval = 0; if (yval > maxyval) --- 1708,1712 ----
if (yonset >= 0) ! yval = yloc + *(t_float *)((elem + elemsize * i) + yonset); else yval = 0; if (yval > maxyval) *************** *** 1735,1739 **** char outline[20]; int lastpixel = -1, ndrawn = 0; ! float yval = 0, wval = 0, xpix; int ixpix = 0; /* draw the trace */ --- 1735,1739 ---- char outline[20]; int lastpixel = -1, ndrawn = 0; ! t_float yval = 0, wval = 0, xpix; int ixpix = 0; /* draw the trace */ *************** *** 1750,1760 **** { if (xonset >= 0) ! usexloc = xloc + *(float *)((elem + elemsize * i) + xonset); else usexloc = xsum, xsum += xinc; if (yonset >= 0) ! yval = *(float *)((elem + elemsize * i) + yonset); else yval = 0; ! wval = *(float *)((elem + elemsize * i) + wonset); xpix = glist_xtopixels(glist, basex + fielddesc_cvttocoord(xfielddesc, usexloc)); --- 1750,1760 ---- { if (xonset >= 0) ! usexloc = xloc + *(t_float *)((elem + elemsize * i) + xonset); else usexloc = xsum, xsum += xinc; if (yonset >= 0) ! yval = *(t_float *)((elem + elemsize * i) + yonset); else yval = 0; ! wval = *(t_float *)((elem + elemsize * i) + wonset); xpix = glist_xtopixels(glist, basex + fielddesc_cvttocoord(xfielddesc, usexloc)); *************** *** 1775,1787 **** for (i = nelem-1; i >= 0; i--) { ! float usexloc; if (xonset >= 0) ! usexloc = xloc + *(float *)((elem + elemsize * i) + xonset); else xsum -= xinc, usexloc = xsum; if (yonset >= 0) ! yval = *(float *)((elem + elemsize * i) + yonset); else yval = 0; ! wval = *(float *)((elem + elemsize * i) + wonset); xpix = glist_xtopixels(glist, basex + fielddesc_cvttocoord(xfielddesc, usexloc)); --- 1775,1787 ---- for (i = nelem-1; i >= 0; i--) { ! t_float usexloc; if (xonset >= 0) ! usexloc = xloc + *(t_float *)((elem + elemsize * i) + xonset); else xsum -= xinc, usexloc = xsum; if (yonset >= 0) ! yval = *(t_float *)((elem + elemsize * i) + yonset); else yval = 0; ! wval = *(t_float *)((elem + elemsize * i) + wonset); xpix = glist_xtopixels(glist, basex + fielddesc_cvttocoord(xfielddesc, usexloc)); *************** *** 1827,1837 **** for (xsum = xloc, i = 0; i < nelem; i++) { ! float usexloc; if (xonset >= 0) ! usexloc = xloc + *(float *)((elem + elemsize * i) + xonset); else usexloc = xsum, xsum += xinc; if (yonset >= 0) ! yval = *(float *)((elem + elemsize * i) + yonset); else yval = 0; xpix = glist_xtopixels(glist, --- 1827,1837 ---- for (xsum = xloc, i = 0; i < nelem; i++) { ! t_float usexloc; if (xonset >= 0) ! usexloc = xloc + *(t_float *)((elem + elemsize * i) + xonset); else usexloc = xsum, xsum += xinc; if (yonset >= 0) ! yval = *(t_float *)((elem + elemsize * i) + yonset); else yval = 0; xpix = glist_xtopixels(glist, *************** *** 1869,1880 **** for (xsum = xloc, i = 0; i < nelem; i++) { ! float usexloc, useyloc; t_gobj *y; if (xonset >= 0) usexloc = basex + xloc + ! *(float *)((elem + elemsize * i) + xonset); else usexloc = basex + xsum, xsum += xinc; if (yonset >= 0) ! yval = *(float *)((elem + elemsize * i) + yonset); else yval = 0; useyloc = basey + yloc + --- 1869,1880 ---- for (xsum = xloc, i = 0; i < nelem; i++) { ! t_float usexloc, useyloc; t_gobj *y; if (xonset >= 0) usexloc = basex + xloc + ! *(t_float *)((elem + elemsize * i) + xonset); else usexloc = basex + xsum, xsum += xinc; if (yonset >= 0) ! yval = *(t_float *)((elem + elemsize * i) + yonset); else yval = 0; useyloc = basey + yloc + *************** *** 1918,1927 **** static int plot_click(t_gobj *z, t_glist *glist, t_word *data, t_template *template, t_scalar *sc, t_array *ap, ! float basex, float basey, int xpix, int ypix, int shift, int alt, int dbl, int doit) { t_plot *x = (t_plot *)z; t_symbol *elemtemplatesym; ! float linewidth, xloc, xinc, yloc, style, vis, scalarvis; t_array *array; t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc; --- 1918,1927 ---- static int plot_click(t_gobj *z, t_glist *glist, t_word *data, t_template *template, t_scalar *sc, t_array *ap, ! t_float basex, t_float basey, int xpix, int ypix, int shift, int alt, int dbl, int doit) { t_plot *x = (t_plot *)z; t_symbol *elemtemplatesym; ! t_float linewidth, xloc, xinc, yloc, style, vis, scalarvis; t_array *array; t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc; *************** *** 2059,2063 ****
static void drawnumber_getrect(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int *xp1, int *yp1, int *xp2, int *yp2) { --- 2059,2063 ----
static void drawnumber_getrect(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int *xp1, int *yp1, int *xp2, int *yp2) { *************** *** 2091,2095 ****
static void drawnumber_displace(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int dx, int dy) { --- 2091,2095 ----
static void drawnumber_displace(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int dx, int dy) { *************** *** 2098,2102 ****
static void drawnumber_select(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int state) { --- 2098,2102 ----
static void drawnumber_select(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int state) { *************** *** 2106,2110 ****
static void drawnumber_activate(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int state) { --- 2106,2110 ----
static void drawnumber_activate(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int state) { *************** *** 2113,2117 ****
static void drawnumber_vis(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, float basex, float basey, int vis) { --- 2113,2117 ----
static void drawnumber_vis(t_gobj *z, t_glist *glist, ! t_word *data, t_template *template, t_float basex, t_float basey, int vis) { *************** *** 2137,2142 **** sys_vgui(".x%lx.c create text %d %d -anchor nw -fill %s -text {%s}", glist_getcanvas(glist), xloc, yloc, colorstring, buf); ! sys_vgui(" -font -*-courier-bold--normal--%d-*", ! sys_hostfontsize(glist_getfont(glist))); sys_vgui(" -tags drawnumber%lx\n", data); } --- 2137,2142 ---- sys_vgui(".x%lx.c create text %d %d -anchor nw -fill %s -text {%s}", glist_getcanvas(glist), xloc, yloc, colorstring, buf); ! sys_vgui(" -font {{%s} -%d %s}", sys_font, ! sys_hostfontsize(glist_getfont(glist)), sys_fontweight); sys_vgui(" -tags drawnumber%lx\n", data); } *************** *** 2144,2148 **** }
! static float drawnumber_motion_ycumulative; static t_glist *drawnumber_motion_glist; static t_scalar *drawnumber_motion_scalar; --- 2144,2148 ---- }
! static t_float drawnumber_motion_ycumulative; static t_glist *drawnumber_motion_glist; static t_scalar *drawnumber_motion_scalar; *************** *** 2226,2230 **** { /* key entry for a numeric field. This is just a stopgap. */ ! float newf; if (drawnumber_motion_firstkey) sbuf[0] = 0; --- 2226,2230 ---- { /* key entry for a numeric field. This is just a stopgap. */ ! t_float newf; if (drawnumber_motion_firstkey) sbuf[0] = 0; *************** *** 2259,2263 **** static int drawnumber_click(t_gobj *z, t_glist *glist, t_word *data, t_template *template, t_scalar *sc, t_array *ap, ! float basex, float basey, int xpix, int ypix, int shift, int alt, int dbl, int doit) { --- 2259,2263 ---- static int drawnumber_click(t_gobj *z, t_glist *glist, t_word *data, t_template *template, t_scalar *sc, t_array *ap, ! t_float basex, t_float basey, int xpix, int ypix, int shift, int alt, int dbl, int doit) {
Index: g_array.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_array.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** g_array.c 20 Jul 2007 03:25:20 -0000 1.13 --- g_array.c 28 Dec 2007 03:43:03 -0000 1.14 *************** *** 395,399 **** int saveit = ((flags & 1) != 0); int style = ((flags & 6) >> 1); ! float stylewas = template_getfloat( template_findbyname(x->x_scalar->sc_template), gensym("style"), x->x_scalar->sc_vec, 1); --- 395,399 ---- int saveit = ((flags & 1) != 0); int style = ((flags & 6) >> 1); ! t_float stylewas = template_getfloat( template_findbyname(x->x_scalar->sc_template), gensym("style"), x->x_scalar->sc_vec, 1); *************** *** 450,454 **** garray_fittograph(x, size, style); template_setfloat(scalartemplate, gensym("style"), ! x->x_scalar->sc_vec, (float)style, 0);
garray_setsaveit(x, (saveit != 0)); --- 450,454 ---- garray_fittograph(x, size, style); template_setfloat(scalartemplate, gensym("style"), ! x->x_scalar->sc_vec, (t_float)style, 0);
garray_setsaveit(x, (saveit != 0)); *************** *** 461,465 **** { int i, xonset=0, yonset=0, type=0, elemsize=0; ! float yval; char cmdbuf[200]; t_symbol *arraytype; --- 461,465 ---- { int i, xonset=0, yonset=0, type=0, elemsize=0; ! t_float yval; char cmdbuf[200]; t_symbol *arraytype; *************** *** 479,483 **** for (i = 0; i < ARRAYPAGESIZE && i < a->a_n; i++) { ! yval = *(float *)(a->a_vec + elemsize * i + yonset); sys_vgui(".%sArrayWindow.lb insert %d {%d) %g}\n", --- 479,483 ---- for (i = 0; i < ARRAYPAGESIZE && i < a->a_n; i++) { ! yval = *(t_float *)(a->a_vec + elemsize * i + yonset); sys_vgui(".%sArrayWindow.lb insert %d {%d) %g}\n", *************** *** 494,498 **** { int i, xonset=0, yonset=0, type=0, elemsize=0, topItem; ! float yval; char cmdbuf[200]; t_symbol *arraytype; --- 494,498 ---- { int i, xonset=0, yonset=0, type=0, elemsize=0, topItem; ! t_float yval; char cmdbuf[200]; t_symbol *arraytype; *************** *** 525,529 **** i++) { ! yval = *(float *)(a->a_vec + \ elemsize * i + yonset); sys_vgui(".%sArrayWindow.lb insert %d {%d) %g}\n", --- 525,529 ---- i++) { ! yval = *(t_float *)(a->a_vec + \ elemsize * i + yonset); sys_vgui(".%sArrayWindow.lb insert %d {%d) %g}\n", *************** *** 576,589 **** void array_getcoordinate(t_glist *glist, char *elem, int xonset, int yonset, int wonset, int indx, ! float basex, float basey, float xinc, t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc, ! float *xp, float *yp, float *wp) { ! float xval, yval, ypix, wpix; if (xonset >= 0) ! xval = *(float *)(elem + xonset); else xval = indx * xinc; if (yonset >= 0) ! yval = *(float *)(elem + yonset); else yval = 0; ypix = glist_ytopixels(glist, basey + --- 576,589 ---- void array_getcoordinate(t_glist *glist, char *elem, int xonset, int yonset, int wonset, int indx, ! t_float basex, t_float basey, t_float xinc, t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc, ! t_float *xp, t_float *yp, t_float *wp) { ! t_float xval, yval, ypix, wpix; if (xonset >= 0) ! xval = *(t_float *)(elem + xonset); else xval = indx * xinc; if (yonset >= 0) ! yval = *(t_float *)(elem + yonset); else yval = 0; ypix = glist_ytopixels(glist, basey + *************** *** 592,596 **** { /* found "w" field which controls linewidth. */ ! float wval = *(float *)(elem + wonset); wpix = glist_ytopixels(glist, basey + fielddesc_cvttocoord(yfielddesc, yval) + --- 592,596 ---- { /* found "w" field which controls linewidth. */ ! t_float wval = *(t_float *)(elem + wonset); wpix = glist_ytopixels(glist, basey + fielddesc_cvttocoord(yfielddesc, yval) + *************** *** 606,611 **** }
! static float array_motion_xcumulative; ! static float array_motion_ycumulative; static t_fielddesc *array_motion_xfield; static t_fielddesc *array_motion_yfield; --- 606,611 ---- }
! static t_float array_motion_xcumulative; ! static t_float array_motion_ycumulative; static t_fielddesc *array_motion_xfield; static t_fielddesc *array_motion_yfield; *************** *** 618,624 **** static int array_motion_elemsize; static int array_motion_altkey; ! static float array_motion_initx; ! static float array_motion_xperpix; ! static float array_motion_yperpix; static int array_motion_lastx; static int array_motion_fatten; --- 618,624 ---- static int array_motion_elemsize; static int array_motion_altkey; ! static t_float array_motion_initx; ! static t_float array_motion_xperpix; ! static t_float array_motion_yperpix; static int array_motion_lastx; static int array_motion_fatten; *************** *** 639,645 **** t_word *thisword = (t_word *)(((char *)array_motion_wp) + i * array_motion_elemsize); ! float xwas = fielddesc_getcoord(array_motion_xfield, array_motion_template, thisword, 1); ! float ywas = (array_motion_yfield ? fielddesc_getcoord(array_motion_yfield, array_motion_template, thisword, 1) : 0); --- 639,645 ---- t_word *thisword = (t_word *)(((char *)array_motion_wp) + i * array_motion_elemsize); ! t_float xwas = fielddesc_getcoord(array_motion_xfield, array_motion_template, thisword, 1); ! t_float ywas = (array_motion_yfield ? fielddesc_getcoord(array_motion_yfield, array_motion_template, thisword, 1) : 0); *************** *** 652,656 **** if (i == 0) { ! float newy = ywas + dy * array_motion_yperpix; if (newy < 0) newy = 0; --- 652,656 ---- if (i == 0) { ! t_float newy = ywas + dy * array_motion_yperpix; if (newy < 0) newy = 0; *************** *** 673,677 **** int thisx = array_motion_initx + array_motion_xcumulative + 0.5, x2; int increment, i, nchange; ! float newy = array_motion_ycumulative, oldy = fielddesc_getcoord(array_motion_yfield, array_motion_template, --- 673,677 ---- int thisx = array_motion_initx + array_motion_xcumulative + 0.5, x2; int increment, i, nchange; ! t_float newy = array_motion_ycumulative, oldy = fielddesc_getcoord(array_motion_yfield, array_motion_template, *************** *** 679,683 **** array_motion_elemsize * array_motion_lastx), 1); ! float ydiff = newy - oldy; if (thisx < 0) thisx = 0; else if (thisx >= array_motion_npoints) --- 679,683 ---- array_motion_elemsize * array_motion_lastx), 1); ! t_float ydiff = newy - oldy; if (thisx < 0) thisx = 0; else if (thisx >= array_motion_npoints) *************** *** 705,709 **** int scalar_doclick(t_word *data, t_template *template, t_scalar *sc, t_array *ap, struct _glist *owner, ! float xloc, float yloc, int xpix, int ypix, int shift, int alt, int dbl, int doit);
--- 705,709 ---- int scalar_doclick(t_word *data, t_template *template, t_scalar *sc, t_array *ap, struct _glist *owner, ! t_float xloc, t_float yloc, int xpix, int ypix, int shift, int alt, int dbl, int doit);
*************** *** 713,717 **** t_scalar *sc, t_array *ap, t_symbol *elemtemplatesym, ! float linewidth, float xloc, float xinc, float yloc, t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield, int xpix, int ypix, int shift, int alt, int dbl, int doit) --- 713,717 ---- t_scalar *sc, t_array *ap, t_symbol *elemtemplatesym, ! t_float linewidth, t_float xloc, t_float xinc, t_float yloc, t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield, int xpix, int ypix, int shift, int alt, int dbl, int doit) *************** *** 720,724 **** t_template *elemtemplate; int elemsize, yonset, wonset, xonset, i, incr, hit; ! float xsum;
if (elemtemplatesym == &s_float) --- 720,724 ---- t_template *elemtemplate; int elemsize, yonset, wonset, xonset, i, incr, hit; ! t_float xsum;
if (elemtemplatesym == &s_float) *************** *** 734,744 **** for (i = 0, xsum = 0; i < array->a_n; i += incr) { ! float usexloc, useyloc; if (xonset >= 0) usexloc = xloc + fielddesc_cvttocoord(xfield, ! *(float *)(((char *)(array->a_vec) + elemsize * i) + xonset)); else usexloc = xloc + xsum, xsum += xinc; useyloc = yloc + (yonset >= 0 ? fielddesc_cvttocoord(yfield, ! *(float *)(((char *)(array->a_vec) + elemsize * i) + yonset)) : 0);
if (hit = scalar_doclick( --- 734,744 ---- for (i = 0, xsum = 0; i < array->a_n; i += incr) { ! t_float usexloc, useyloc; if (xonset >= 0) usexloc = xloc + fielddesc_cvttocoord(xfield, ! *(t_float *)(((char *)(array->a_vec) + elemsize * i) + xonset)); else usexloc = xloc + xsum, xsum += xinc; useyloc = yloc + (yonset >= 0 ? fielddesc_cvttocoord(yfield, ! *(t_float *)(((char *)(array->a_vec) + elemsize * i) + yonset)) : 0);
if (hit = scalar_doclick( *************** *** 756,760 **** int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap, t_symbol *elemtemplatesym, ! float linewidth, float xloc, float xinc, float yloc, float scalarvis, t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield, int xpix, int ypix, int shift, int alt, int dbl, int doit) --- 756,760 ---- int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap, t_symbol *elemtemplatesym, ! t_float linewidth, t_float xloc, t_float xinc, t_float yloc, t_float scalarvis, t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield, int xpix, int ypix, int shift, int alt, int dbl, int doit) *************** *** 768,777 **** &xonset, &yonset, &wonset)) { ! float best = 100; /* if it has more than 2000 points, just check 1000 of them. */ int incr = (array->a_n <= 2000 ? 1 : array->a_n / 1000); for (i = 0; i < array->a_n; i += incr) { ! float pxpix, pypix, pwpix, dx, dy; array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize, xonset, yonset, wonset, i, xloc, yloc, xinc, --- 768,777 ---- &xonset, &yonset, &wonset)) { ! t_float best = 100; /* if it has more than 2000 points, just check 1000 of them. */ int incr = (array->a_n <= 2000 ? 1 : array->a_n / 1000); for (i = 0; i < array->a_n; i += incr) { ! t_float pxpix, pypix, pwpix, dx, dy; array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize, xonset, yonset, wonset, i, xloc, yloc, xinc, *************** *** 811,815 **** for (i = 0; i < array->a_n; i += incr) { ! float pxpix, pypix, pwpix, dx, dy, dy2, dy3; array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize, xonset, yonset, wonset, i, xloc, yloc, xinc, --- 811,815 ---- for (i = 0; i < array->a_n; i += incr) { ! t_float pxpix, pypix, pwpix, dx, dy, dy2, dy3; array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize, xonset, yonset, wonset, i, xloc, yloc, xinc, *************** *** 904,908 **** fielddesc_getcoord(yfield, array_motion_template, (t_word *)(elem + i * elemsize), 1); ! /* *(float *)((elem + elemsize * i) + yonset); */ } else --- 904,908 ---- fielddesc_getcoord(yfield, array_motion_template, (t_word *)(elem + i * elemsize), 1); ! /* *(t_float *)((elem + elemsize * i) + yonset); */ } else *************** *** 930,934 **** int *xp1, int *yp1, int *xp2, int *yp2) { ! float x1 = 0x7fffffff, y1 = 0x7fffffff, x2 = -0x7fffffff, y2 = -0x7fffffff; t_canvas *elemtemplatecanvas; t_template *elemtemplate; --- 930,934 ---- int *xp1, int *yp1, int *xp2, int *yp2) { ! t_float x1 = 0x7fffffff, y1 = 0x7fffffff, x2 = -0x7fffffff, y2 = -0x7fffffff; t_canvas *elemtemplatecanvas; t_template *elemtemplate; *************** *** 945,949 **** for (i = 0; i < array->a_n; i += incr) { ! float pxpix, pypix, pwpix, dx, dy; array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize, --- 945,949 ---- for (i = 0; i < array->a_n; i += incr) { ! t_float pxpix, pypix, pwpix, dx, dy; array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize, *************** *** 1153,1157 **** int garray_getfloatarray(t_garray *x, int *size, t_float **vec) { ! if (sizeof(t_word) != sizeof(float)) { static int warned; --- 1153,1157 ---- int garray_getfloatarray(t_garray *x, int *size, t_float **vec) { ! if (sizeof(t_word) != sizeof(t_float)) { static int warned; *************** *** 1181,1185 **** error("%s: needs floating-point 'y' field", x->x_realname); else for (i = 0; i < array->a_n; i++) ! *((float *)((char *)array->a_vec + elemsize * i) + yonset) = g; garray_redraw(x); --- 1181,1185 ---- error("%s: needs floating-point 'y' field", x->x_realname); else for (i = 0; i < array->a_n; i++) ! *((t_float *)((char *)array->a_vec + elemsize * i) + yonset) = g; garray_redraw(x); *************** *** 1187,1191 ****
/* sum of Fourier components; called from routines below */ ! static void garray_dofo(t_garray *x, int npoints, float dcval, int nsin, t_float *vsin, int sineflag) { --- 1187,1191 ----
/* sum of Fourier components; called from routines below */ ! static void garray_dofo(t_garray *x, int npoints, t_float dcval, int nsin, t_float *vsin, int sineflag) { *************** *** 1214,1218 **** for (j = 0, fj = 0; j < nsin; j++, fj += phase) sum += vsin[j] * cos(fj); ! *((float *)((array->a_vec + elemsize * i)) + yonset) = sum; } --- 1214,1218 ---- for (j = 0, fj = 0; j < nsin; j++, fj += phase) sum += vsin[j] * cos(fj); ! *((t_float *)((array->a_vec + elemsize * i)) + yonset) = sum; } *************** *** 1283,1287 **** for (i = 0, maxv = 0; i < array->a_n; i++) { ! double v = *((float *)(array->a_vec + elemsize * i) + yonset); if (v > maxv) --- 1283,1287 ---- for (i = 0, maxv = 0; i < array->a_n; i++) { ! double v = *((t_float *)(array->a_vec + elemsize * i) + yonset); if (v > maxv) *************** *** 1294,1298 **** renormer = f / maxv; for (i = 0; i < array->a_n; i++) ! *((float *)(array->a_vec + elemsize * i) + yonset) *= renormer; } --- 1294,1298 ---- renormer = f / maxv; for (i = 0; i < array->a_n; i++) ! *((t_float *)(array->a_vec + elemsize * i) + yonset) *= renormer; } *************** *** 1332,1336 **** } for (i = 0; i < argc; i++) ! *((float *)(array->a_vec + elemsize * (i + firstindex)) + yonset) = atom_getfloat(argv + i); } --- 1332,1336 ---- } for (i = 0; i < argc; i++) ! *((t_float *)(array->a_vec + elemsize * (i + firstindex)) + yonset) = atom_getfloat(argv + i); } *************** *** 1403,1407 **** for (i = 0; i < nelem; i++) { ! if (!fscanf(fd, "%f", ((float *)(array->a_vec + elemsize * i) + yonset))) { --- 1403,1407 ---- for (i = 0; i < nelem; i++) { ! if (!fscanf(fd, "%f", ((t_float *)(array->a_vec + elemsize * i) + yonset))) { *************** *** 1412,1416 **** } while (i < nelem) ! *((float *)(array->a_vec + elemsize * i) + yonset) = 0, i++; fclose(fd); --- 1412,1416 ---- } while (i < nelem) ! *((t_float *)(array->a_vec + elemsize * i) + yonset) = 0, i++; fclose(fd); *************** *** 1440,1444 **** { if (fprintf(fd, "%g\n", ! *(float *)(((array->a_vec + sizeof(t_word) * i)) + yonset)) < 1) { post("%s: write error", filename->s_name); --- 1440,1444 ---- { if (fprintf(fd, "%g\n", ! *(t_float *)(((array->a_vec + sizeof(t_word) * i)) + yonset)) < 1) { post("%s: write error", filename->s_name);
Index: s_audio_oss.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_oss.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** s_audio_oss.c 28 Nov 2004 21:20:43 -0000 1.7 --- s_audio_oss.c 28 Dec 2007 03:43:05 -0000 1.8 *************** *** 43,48 **** /* GLOBALS */ static int linux_meters; /* true if we're metering */ ! static float linux_inmax; /* max input amplitude */ ! static float linux_outmax; /* max output amplitude */ static int linux_fragsize = 0; /* for block mode; block size (sample frames) */
--- 43,48 ---- /* GLOBALS */ static int linux_meters; /* true if we're metering */ ! static t_sample linux_inmax; /* max input amplitude */ ! static t_sample linux_outmax; /* max output amplitude */ static int linux_fragsize = 0; /* for block mode; block size (sample frames) */
*************** *** 65,69 ****
/* exported variables */ ! float sys_dacsr; t_sample *sys_soundout; t_sample *sys_soundin; --- 65,69 ----
/* exported variables */ ! t_float sys_dacsr; t_sample *sys_soundout; t_sample *sys_soundin; *************** *** 246,251 **** static int oss_setchannels(int fd, int wantchannels, char *devname) { ! int param = wantchannels; ! while (param > 1) { --- 246,270 ---- static int oss_setchannels(int fd, int wantchannels, char *devname) { ! int param; ! if (sys_verbose) ! post("setchan %d", wantchannels); ! if (ioctl(fd, SNDCTL_DSP_CHANNELS, ¶m) == -1) ! { ! if (sys_verbose) ! error("OSS: SOUND_DSP_READ_CHANNELS failed %s", devname); ! } ! else ! { ! if (sys_verbose) ! post("channels originally %d for %s", param, devname); ! if (param == wantchannels) ! { ! if (sys_verbose) ! post("number of channels doesn't need setting\n"); ! return (wantchannels); ! } ! } ! param = wantchannels; ! whynot: while (param > 1) { *************** *** 400,407 ****
/* perhaps it's already open from the above? */ ! if (linux_dacs[n].d_fd >= 0) { fd = linux_adcs[n].d_fd; alreadyopened = 1; } else --- 419,428 ----
/* perhaps it's already open from the above? */ ! if (linux_adcs[n].d_fd >= 0) { fd = linux_adcs[n].d_fd; alreadyopened = 1; + if (sys_verbose) + post("already opened it"); } else *************** *** 625,629 **** int oss_send_dacs(void) { ! float *fp1, *fp2; long fill; int i, j, dev, rtnval = SENDDACS_YES; --- 646,650 ---- int oss_send_dacs(void) { ! t_sample *fp1, *fp2; long fill; int i, j, dev, rtnval = SENDDACS_YES; *************** *** 759,763 **** } memset(sys_soundout, 0, ! sys_outchannels * (sizeof(float) * DEFDACBLKSIZE));
/* do input */ --- 780,784 ---- } memset(sys_soundout, 0, ! sys_outchannels * (sizeof(t_sample) * DEFDACBLKSIZE));
/* do input */
Index: g_io.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_io.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** g_io.c 19 Sep 2006 22:30:33 -0000 1.7 --- g_io.c 28 Dec 2007 03:43:04 -0000 1.8 *************** *** 293,300 **** t_outlet *x_parentoutlet; int x_bufsize; ! t_float *x_buf; /* signal buffer; zero if not a signal */ ! t_float *x_endbuf; ! t_float *x_empty; /* next to read out of buffer in epilog code */ ! t_float *x_write; /* next to write in to buffer */ int x_hop; /* hopsize */ /* vice versa from the inlet, if we don't block, this holds the --- 293,300 ---- t_outlet *x_parentoutlet; int x_bufsize; ! t_sample *x_buf; /* signal buffer; zero if not a signal */ ! t_sample *x_endbuf; ! t_sample *x_empty; /* next to read out of buffer in epilog code */ ! t_sample *x_write; /* next to write in to buffer */ int x_hop; /* hopsize */ /* vice versa from the inlet, if we don't block, this holds the *************** *** 374,378 **** t_float *in = (t_float *)(w[2]); int n = (int)(w[3]); ! t_float *out = x->x_write, *outwas = out; #if 0 if (tot < 5) post("-in %lx out %lx n %d", in, out, n); --- 374,378 ---- t_float *in = (t_float *)(w[2]); int n = (int)(w[3]); ! t_sample *out = x->x_write, *outwas = out; #if 0 if (tot < 5) post("-in %lx out %lx n %d", in, out, n); *************** *** 394,401 **** { t_voutlet *x = (t_voutlet *)(w[1]); ! t_float *out = (t_float *)(w[2]);
int n = (int)(w[3]); ! t_float *in = x->x_empty; if (x->x_updown.downsample != x->x_updown.upsample) out = x->x_updown.s_vec; --- 394,401 ---- { t_voutlet *x = (t_voutlet *)(w[1]); ! t_sample *out = (t_sample *)(w[2]);
int n = (int)(w[3]); ! t_sample *in = x->x_empty; if (x->x_updown.downsample != x->x_updown.upsample) out = x->x_updown.s_vec; *************** *** 414,419 **** t_voutlet *x = (t_voutlet *)(w[1]); int n = (int)(w[2]); ! t_float *in = x->x_empty; ! t_float *out = x->x_updown.s_vec;
#if 0 --- 414,419 ---- t_voutlet *x = (t_voutlet *)(w[1]); int n = (int)(w[2]); ! t_sample *in = x->x_empty; ! t_sample *out = x->x_updown.s_vec;
#if 0 *************** *** 505,511 **** if (bufsize != (oldbufsize = x->x_bufsize)) { ! t_float *buf = x->x_buf; t_freebytes(buf, oldbufsize * sizeof(*buf)); ! buf = (t_float *)t_getbytes(bufsize * sizeof(*buf)); memset((char *)buf, 0, bufsize * sizeof(*buf)); x->x_bufsize = bufsize; --- 505,511 ---- if (bufsize != (oldbufsize = x->x_bufsize)) { ! t_sample *buf = x->x_buf; t_freebytes(buf, oldbufsize * sizeof(*buf)); ! buf = (t_sample *)t_getbytes(bufsize * sizeof(*buf)); memset((char *)buf, 0, bufsize * sizeof(*buf)); x->x_bufsize = bufsize; *************** *** 557,561 **** &x->x_obj.ob_pd, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); ! x->x_endbuf = x->x_buf = (t_float *)getbytes(0); x->x_bufsize = 0;
--- 557,561 ---- &x->x_obj.ob_pd, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); ! x->x_endbuf = x->x_buf = (t_sample *)getbytes(0); x->x_bufsize = 0;
Index: d_global.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_global.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** d_global.c 6 Sep 2004 20:20:33 -0000 1.2 --- d_global.c 28 Dec 2007 03:43:03 -0000 1.3 *************** *** 18,23 **** t_symbol *x_sym; int x_n; ! float *x_vec; ! float x_f; } t_sigsend;
--- 18,23 ---- t_symbol *x_sym; int x_n; ! t_sample *x_vec; ! t_float x_f; } t_sigsend;
*************** *** 28,33 **** x->x_sym = s; x->x_n = DEFSENDVS; ! x->x_vec = (float *)getbytes(DEFSENDVS * sizeof(float)); ! memset((char *)(x->x_vec), 0, DEFSENDVS * sizeof(float)); x->x_f = 0; return (x); --- 28,33 ---- x->x_sym = s; x->x_n = DEFSENDVS; ! x->x_vec = (t_sample *)getbytes(DEFSENDVS * sizeof(t_sample)); ! memset((char *)(x->x_vec), 0, DEFSENDVS * sizeof(t_sample)); x->x_f = 0; return (x); *************** *** 36,41 **** static t_int *sigsend_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = (int)(w[3]); while (n--) --- 36,41 ---- static t_int *sigsend_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]); while (n--) *************** *** 58,62 **** { pd_unbind(&x->x_obj.ob_pd, x->x_sym); ! freebytes(x->x_vec, x->x_n * sizeof(float)); }
--- 58,62 ---- { pd_unbind(&x->x_obj.ob_pd, x->x_sym); ! freebytes(x->x_vec, x->x_n * sizeof(t_sample)); }
*************** *** 77,81 **** t_object x_obj; t_symbol *x_sym; ! t_float *x_wherefrom; int x_n; } t_sigreceive; --- 77,81 ---- t_object x_obj; t_symbol *x_sym; ! t_sample *x_wherefrom; int x_n; } t_sigreceive; *************** *** 94,100 **** { t_sigreceive *x = (t_sigreceive *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = (int)(w[3]); ! t_float *in = x->x_wherefrom; if (in) { --- 94,100 ---- { t_sigreceive *x = (t_sigreceive *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]); ! t_sample *in = x->x_wherefrom; if (in) { *************** *** 114,120 **** { t_sigreceive *x = (t_sigreceive *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = (int)(w[3]); ! t_float *in = x->x_wherefrom; if (in) { --- 114,120 ---- { t_sigreceive *x = (t_sigreceive *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]); ! t_sample *in = x->x_wherefrom; if (in) { *************** *** 195,199 **** t_symbol *x_sym; int x_n; ! float *x_vec; } t_sigcatch;
--- 195,199 ---- t_symbol *x_sym; int x_n; ! t_sample *x_vec; } t_sigcatch;
*************** *** 204,209 **** x->x_sym = s; x->x_n = DEFSENDVS; ! x->x_vec = (float *)getbytes(DEFSENDVS * sizeof(float)); ! memset((char *)(x->x_vec), 0, DEFSENDVS * sizeof(float)); outlet_new(&x->x_obj, &s_signal); return (x); --- 204,209 ---- x->x_sym = s; x->x_n = DEFSENDVS; ! x->x_vec = (t_sample *)getbytes(DEFSENDVS * sizeof(t_sample)); ! memset((char *)(x->x_vec), 0, DEFSENDVS * sizeof(t_sample)); outlet_new(&x->x_obj, &s_signal); return (x); *************** *** 212,217 **** static t_int *sigcatch_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = (int)(w[3]); while (n--) *out++ = *in, *in++ = 0; --- 212,217 ---- static t_int *sigcatch_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]); while (n--) *out++ = *in, *in++ = 0; *************** *** 222,227 **** static t_int *sigcatch_perf8(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float *out = (t_float *)(w[2]); int n = (int)(w[3]); for (; n; n -= 8, in += 8, out += 8) --- 222,227 ---- static t_int *sigcatch_perf8(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]); for (; n; n -= 8, in += 8, out += 8) *************** *** 251,255 **** { pd_unbind(&x->x_obj.ob_pd, x->x_sym); ! freebytes(x->x_vec, x->x_n * sizeof(float)); }
--- 251,255 ---- { pd_unbind(&x->x_obj.ob_pd, x->x_sym); ! freebytes(x->x_vec, x->x_n * sizeof(t_sample)); }
*************** *** 269,273 **** t_object x_obj; t_symbol *x_sym; ! t_float *x_whereto; int x_n; t_float x_f; --- 269,273 ---- t_object x_obj; t_symbol *x_sym; ! t_sample *x_whereto; int x_n; t_float x_f; *************** *** 287,293 **** { t_sigthrow *x = (t_sigthrow *)(w[1]); ! t_float *in = (t_float *)(w[2]); int n = (int)(w[3]); ! t_float *out = x->x_whereto; if (out) { --- 287,293 ---- { t_sigthrow *x = (t_sigthrow *)(w[1]); ! t_sample *in = (t_sample *)(w[2]); int n = (int)(w[3]); ! t_sample *out = x->x_whereto; if (out) {
Index: x_misc.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_misc.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** x_misc.c 2 Aug 2007 00:33:50 -0000 1.4 --- x_misc.c 28 Dec 2007 03:43:06 -0000 1.5 *************** *** 71,75 **** }
! static void random_seed(t_random *x, float f, float glob) { x->x_state = f; --- 71,75 ---- }
! static void random_seed(t_random *x, t_float f, t_float glob) { x->x_state = f; *************** *** 229,233 **** { #ifdef UNISTD ! float elapsedcpu; struct tms newcputime; times(&newcputime); --- 229,233 ---- { #ifdef UNISTD ! t_float elapsedcpu; struct tms newcputime; times(&newcputime); *************** *** 238,242 **** #endif #ifdef MSW ! float elapsedcpu; FILETIME ignorethis, ignorethat; LARGE_INTEGER usertime, kerneltime; --- 238,242 ---- #endif #ifdef MSW ! t_float elapsedcpu; FILETIME ignorethis, ignorethat; LARGE_INTEGER usertime, kerneltime;
Index: g_scalar.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_scalar.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** g_scalar.c 20 Jul 2007 03:25:20 -0000 1.9 --- g_scalar.c 28 Dec 2007 03:43:04 -0000 1.10 *************** *** 50,54 **** if (type == DT_FLOAT) { ! float f; if (argc) { --- 50,54 ---- if (type == DT_FLOAT) { ! t_float f; if (argc) { *************** *** 146,150 ****
/* -------------------- widget behavior for scalar ------------ */ ! void scalar_getbasexy(t_scalar *x, float *basex, float *basey) { t_template *template = template_findbyname(x->sc_template); --- 146,150 ----
/* -------------------- widget behavior for scalar ------------ */ ! void scalar_getbasexy(t_scalar *x, t_float *basex, t_float *basey) { t_template *template = template_findbyname(x->sc_template); *************** *** 161,165 **** int x1 = 0x7fffffff, x2 = -0x7fffffff, y1 = 0x7fffffff, y2 = -0x7fffffff; t_gobj *y; ! float basex, basey; scalar_getbasexy(x, &basex, &basey); /* if someone deleted the template canvas, we're just a point */ --- 161,165 ---- int x1 = 0x7fffffff, x2 = -0x7fffffff, y1 = 0x7fffffff, y2 = -0x7fffffff; t_gobj *y; ! t_float basex, basey; scalar_getbasexy(x, &basex, &basey); /* if someone deleted the template canvas, we're just a point */ *************** *** 261,266 **** gpointer_setglist(&gp, glist, x); SETPOINTER(&at[0], &gp); ! SETFLOAT(&at[1], (float)dx); ! SETFLOAT(&at[2], (float)dy); template_notify(template, gensym("displace"), 2, at); scalar_redraw(x, glist); --- 261,266 ---- gpointer_setglist(&gp, glist, x); SETPOINTER(&at[0], &gp); ! SETFLOAT(&at[1], (t_float)dx); ! SETFLOAT(&at[2], (t_float)dy); template_notify(template, gensym("displace"), 2, at); scalar_redraw(x, glist); *************** *** 284,288 **** t_canvas *templatecanvas = template_findcanvas(template); t_gobj *y; ! float basex, basey; scalar_getbasexy(x, &basex, &basey); /* if we don't know how to draw it, make a small rectangle */ --- 284,288 ---- t_canvas *templatecanvas = template_findcanvas(template); t_gobj *y; ! t_float basex, basey; scalar_getbasexy(x, &basex, &basey); /* if we don't know how to draw it, make a small rectangle */ *************** *** 328,332 **** int scalar_doclick(t_word *data, t_template *template, t_scalar *sc, t_array *ap, struct _glist *owner, ! float xloc, float yloc, int xpix, int ypix, int shift, int alt, int dbl, int doit) { --- 328,332 ---- int scalar_doclick(t_word *data, t_template *template, t_scalar *sc, t_array *ap, struct _glist *owner, ! t_float xloc, t_float yloc, int xpix, int ypix, int shift, int alt, int dbl, int doit) { *************** *** 334,339 **** t_canvas *templatecanvas = template_findcanvas(template); t_gobj *y; ! float basex = template_getfloat(template, gensym("x"), data, 0); ! float basey = template_getfloat(template, gensym("y"), data, 0); for (y = templatecanvas->gl_list; y; y = y->g_next) { --- 334,339 ---- t_canvas *templatecanvas = template_findcanvas(template); t_gobj *y; ! t_float basex = template_getfloat(template, gensym("x"), data, 0); ! t_float basey = template_getfloat(template, gensym("y"), data, 0); for (y = templatecanvas->gl_list; y; y = y->g_next) {
Index: configure.in =================================================================== RCS file: /cvsroot/pure-data/pd/src/configure.in,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** configure.in 18 Aug 2007 23:32:43 -0000 1.25 --- configure.in 28 Dec 2007 03:43:02 -0000 1.26 *************** *** 8,11 **** --- 8,12 ---- AC_SUBST(binarymode, -m755) AC_SUBST(fftw, no) + AC_SUBST(tk, yes) AC_SUBST(PDLIB) AC_SUBST(CPPFLAGS) *************** *** 22,25 **** --- 23,27 ---- AC_SUBST(EXTERNTARGET) AC_SUBST(ASIOSRC) + AC_SUBST(GUISRC)
dnl other defaults *************** *** 43,46 **** --- 45,52 ---- AC_ARG_ENABLE(fftw, [ --enable-fftw use FFTW package], fftw=$enableval) + AC_ARG_ENABLE(fat, [ --disable-fat build fat binary on Mac OS X], + fat=$enableval, fat="yes") + AC_ARG_ENABLE(tk, [ --disable-tk build without tcl/tk-GUI], + tk=$enableval)
dnl Checks for programs. *************** *** 78,82 **** dnl Checking for `sin' function in -lm: AC_CHECK_LIB(m, sin,PDLIB="$PDLIB -lm", ! echo "math library required" || exit 1)
dnl Checking for `pthread_create' function in -pthread --- 84,88 ---- dnl Checking for `sin' function in -lm: AC_CHECK_LIB(m, sin,PDLIB="$PDLIB -lm", ! echo "math library required" || exit 1)
dnl Checking for `pthread_create' function in -pthread *************** *** 88,92 ****
dnl Check for fftw package ! if test x$fftw == "xyes"; then AC_CHECK_LIB(fftw, fftw_one,PDLIB="$PDLIB -lfftw", --- 94,98 ----
dnl Check for fftw package ! if test x$fftw = "xyes"; then AC_CHECK_LIB(fftw, fftw_one,PDLIB="$PDLIB -lfftw", *************** *** 97,177 ****
foundit=no ! if test $foundit == "no"; then AC_CHECK_HEADER(tcl.h,foundit=yes,) fi ! if test $foundit == "no"; then AC_CHECK_HEADER(tcl8.7/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.7";foundit=yes,) fi ! if test $foundit == "no"; then AC_CHECK_HEADER(tcl8.6/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.6";foundit=yes,) fi ! if test $foundit == "no"; then AC_CHECK_HEADER(tcl8.5/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.5";foundit=yes,) fi ! if test $foundit == "no"; then AC_CHECK_HEADER(tcl8.4/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.4";foundit=yes,) fi ! if test $foundit == "no"; then AC_CHECK_HEADER(tcl8.4/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/local/include/tcl8.4";foundit=yes,) fi ! if test $foundit == "no"; then AC_CHECK_HEADER(tcl8.3/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.3";foundit=yes,) fi ! if test $foundit == "no"; then AC_CHECK_HEADER(tcl8.2/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.2";foundit=yes,) fi ! if test $foundit == "no"; then echo no tcl header found ! echo bolding trying without... # exit -1 fi
AC_CHECK_LIB(tcl85, main,, ! AC_CHECK_LIB(tcl8.5, main,, AC_CHECK_LIB(tcl84, main,, ! AC_CHECK_LIB(tcl8.4, main,, ! AC_CHECK_LIB(tcl8.3, main,, ! AC_CHECK_LIB(tcl8.2, main,, ! AC_CHECK_LIB(tcl8.0, main,, echo no tcl library found; exit 1)))))))
AC_CHECK_LIB(tk85, main,, ! AC_CHECK_LIB(tk8.5, main,, AC_CHECK_LIB(tk84, main,, ! AC_CHECK_LIB(tk8.4, main,, ! AC_CHECK_LIB(tk8.3, main,, ! AC_CHECK_LIB(tk8.2, main,, ! AC_CHECK_LIB(tk8.0, main,, echo no tk library found; exit 1)))))))
! if test `uname -s` == Linux; then dnl Ckecking for ALSA echo .................... alsa= $alsa dnl This should be fixed so Pd can use ALSA shared libraries where appropriate. ! if test x$alsa == xyes; then ! AC_CHECK_LIB(asound,snd_pcm_info,PDLIB="$PDLIB -lasound" ; alsa="yes",alsa="no") fi
dnl Checking for JACK
! if test x$jack == xyes; then AC_CHECK_LIB(rt,shm_open,LIBS="$LIBS -lrt") AC_CHECK_LIB(jack,jack_set_xrun_callback,LIBS="$LIBS -ljack";jack=xrun,jack=no) --- 103,189 ----
foundit=no ! if test $foundit = "no"; then AC_CHECK_HEADER(tcl.h,foundit=yes,) fi ! if test $foundit = "no"; then AC_CHECK_HEADER(tcl8.7/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.7";foundit=yes,) fi ! if test $foundit = "no"; then AC_CHECK_HEADER(tcl8.6/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.6";foundit=yes,) fi ! if test $foundit = "no"; then AC_CHECK_HEADER(tcl8.5/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.5";foundit=yes,) fi ! if test $foundit = "no"; then AC_CHECK_HEADER(tcl8.4/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.4";foundit=yes,) fi ! if test $foundit = "no"; then AC_CHECK_HEADER(tcl8.4/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/local/include/tcl8.4";foundit=yes,) fi ! if test $foundit = "no"; then AC_CHECK_HEADER(tcl8.3/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.3";foundit=yes,) fi ! if test $foundit = "no"; then AC_CHECK_HEADER(tcl8.2/tcl.h, ! GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.2";foundit=yes,) fi ! if test $foundit = "no"; then echo no tcl header found ! echo bolding trying without... # exit -1 fi
AC_CHECK_LIB(tcl85, main,, ! AC_CHECK_LIB(tcl8.5, main,, AC_CHECK_LIB(tcl84, main,, ! AC_CHECK_LIB(tcl8.4, main,, ! AC_CHECK_LIB(tcl8.3, main,, ! AC_CHECK_LIB(tcl8.2, main,, ! AC_CHECK_LIB(tcl8.0, main,, echo no tcl library found; exit 1)))))))
AC_CHECK_LIB(tk85, main,, ! AC_CHECK_LIB(tk8.5, main,, AC_CHECK_LIB(tk84, main,, ! AC_CHECK_LIB(tk8.4, main,, ! AC_CHECK_LIB(tk8.3, main,, ! AC_CHECK_LIB(tk8.2, main,, ! AC_CHECK_LIB(tk8.0, main,, echo no tk library found; exit 1)))))))
! if test x$tk != "xno"; then ! GUISRC="t_main.c t_tkcmd.c" ! else ! GUISRC= ! fi ! ! if test `uname -s` = Linux; then dnl Ckecking for ALSA echo .................... alsa= $alsa dnl This should be fixed so Pd can use ALSA shared libraries where appropriate. ! if test x$alsa = xyes; then ! AC_CHECK_LIB(asound,snd_pcm_info,PDLIB="$PDLIB -lasound" ; alsa="yes",alsa="no") fi
dnl Checking for JACK
! if test x$jack = xyes; then AC_CHECK_LIB(rt,shm_open,LIBS="$LIBS -lrt") AC_CHECK_LIB(jack,jack_set_xrun_callback,LIBS="$LIBS -ljack";jack=xrun,jack=no) *************** *** 185,261 **** EXT=pd_linux CPPFLAGS="-DDL_OPEN -DPA_USE_OSS -DUNIX -DUNISTD\ ! -DUSEAPI_OSS \ ! -fno-strict-aliasing" SYSSRC="s_midi_oss.c s_audio_oss.c" ! if test x$alsa == "xyes"; then ! SYSSRC=$SYSSRC" s_audio_alsa.c s_audio_alsamm.c s_midi_alsa.c" ! CPPFLAGS=$CPPFLAGS" -DPA_USE_ALSA -DUSEAPI_ALSA" ! LDFLAGS=$LDFLAGS" -lasound" fi
! if test x$portaudio == "xyes"; then ! CPPFLAGS=$CPPFLAGS" -DUSEAPI_PORTAUDIO -DHAVE_SYS_SOUNDCARD_H \ ! -Wno-error \ -I../portaudio/include -I../portaudio/src/common \ ! -I../portaudio/src/os/unix/ \ -I../portmidi/pm_common \ -I../portmidi/pm_linux" ! SYSSRC="s_audio_pa.c \ ! s_audio_pablio.c \ ! s_audio_paring.c \ ! ../portaudio/src/common/pa_allocation.c \ ! ../portaudio/src/common/pa_converters.c \ ! ../portaudio/src/common/pa_cpuload.c \ ! ../portaudio/src/common/pa_dither.c \ ! ../portaudio/src/common/pa_front.c \ ! ../portaudio/src/common/pa_process.c \ ! ../portaudio/src/common/pa_skeleton.c \ ! ../portaudio/src/common/pa_stream.c \ ! ../portaudio/src/common/pa_trace.c \ ! ../portaudio/src/common/pa_debugprint.c \ ! ../portaudio/src/common/pa_ringbuffer.c \ ! ../portaudio/src/os/unix/pa_unix_hostapis.c \ ! ../portaudio/src/os/unix/pa_unix_util.c \ ! ../portaudio/src/hostapi/oss/pa_unix_oss.c "$SYSSRC ! if test x$alsa == "xyes"; ! then ! SYSSRC="../portaudio/src/hostapi/alsa/pa_linux_alsa.c "$SYSSRC ! CPPFLAGS=$CPPFLAGS" -DPA_USE_ALSA" ! fi ! if test x$jack == "xyes"; ! then ! SYSSRC="../portaudio/src/hostapi/jack/pa_jack.c "$SYSSRC ! CPPFLAGS=$CPPFLAGS" -DPA_USE_JACK" ! fi fi ! if test x$setuid == "xyes"; then ! binarymode="-m4755" fi STRIPFLAG=-s GUINAME="pd-gui" ! if test x$USE_DEBUG_CFLAGS == "xyes"; then ! MORECFLAGS=$MORECFLAGS" -g" else ! MORECFLAGS=$MORECFLAGS" -O6 -funroll-loops -fomit-frame-pointer" fi ! if test x$jack == "xyes"; then LDFLAGS=$LDFLAGS" -lrt -ljack" fi ! if test x$jack == "xrun"; then LDFLAGS=$LDFLAGS" -lrt -ljack" fi
- echo MORECFLAGS --------------- $MORECFLAGS OSNUMBER=0
fi
! if test `uname -s` == Darwin; then LDFLAGS="-Wl -framework CoreAudio \ --- 197,272 ---- EXT=pd_linux CPPFLAGS="-DDL_OPEN -DPA_USE_OSS -DUNIX -DUNISTD\ ! -DUSEAPI_OSS \ ! -fno-strict-aliasing" SYSSRC="s_midi_oss.c s_audio_oss.c" ! if test x$alsa = "xyes"; then ! SYSSRC=$SYSSRC" s_audio_alsa.c s_audio_alsamm.c s_midi_alsa.c" ! CPPFLAGS=$CPPFLAGS" -DPA_USE_ALSA -DUSEAPI_ALSA" ! LDFLAGS=$LDFLAGS" -lasound" fi
! if test x$portaudio = "xyes"; then ! CPPFLAGS=$CPPFLAGS" -DUSEAPI_PORTAUDIO -DHAVE_SYS_SOUNDCARD_H \ ! -Wno-error \ -I../portaudio/include -I../portaudio/src/common \ ! -I../portaudio/src/os/unix/ \ -I../portmidi/pm_common \ -I../portmidi/pm_linux" ! SYSSRC="s_audio_pa.c \ ! s_audio_pablio.c \ ! s_audio_paring.c \ ! ../portaudio/src/common/pa_allocation.c \ ! ../portaudio/src/common/pa_converters.c \ ! ../portaudio/src/common/pa_cpuload.c \ ! ../portaudio/src/common/pa_dither.c \ ! ../portaudio/src/common/pa_front.c \ ! ../portaudio/src/common/pa_process.c \ ! ../portaudio/src/common/pa_skeleton.c \ ! ../portaudio/src/common/pa_stream.c \ ! ../portaudio/src/common/pa_trace.c \ ! ../portaudio/src/common/pa_debugprint.c \ ! ../portaudio/src/common/pa_ringbuffer.c \ ! ../portaudio/src/os/unix/pa_unix_hostapis.c \ ! ../portaudio/src/os/unix/pa_unix_util.c \ ! ../portaudio/src/hostapi/oss/pa_unix_oss.c "$SYSSRC ! if test x$alsa = "xyes"; ! then ! SYSSRC="../portaudio/src/hostapi/alsa/pa_linux_alsa.c "$SYSSRC ! CPPFLAGS=$CPPFLAGS" -DPA_USE_ALSA" ! fi ! if test x$jack = "xyes"; ! then ! SYSSRC="../portaudio/src/hostapi/jack/pa_jack.c "$SYSSRC ! CPPFLAGS=$CPPFLAGS" -DPA_USE_JACK" ! fi fi ! if test x$setuid = "xyes"; then ! binarymode="-m4755" fi STRIPFLAG=-s GUINAME="pd-gui" ! if test x$USE_DEBUG_CFLAGS = "xyes"; then ! MORECFLAGS=$MORECFLAGS" -g" else ! MORECFLAGS=$MORECFLAGS" -O6 -funroll-loops -fomit-frame-pointer" fi ! if test x$jack = "xyes"; then LDFLAGS=$LDFLAGS" -lrt -ljack" fi ! if test x$jack = "xrun"; then LDFLAGS=$LDFLAGS" -lrt -ljack" fi
OSNUMBER=0
fi
! if test `uname -s` = Darwin; then LDFLAGS="-Wl -framework CoreAudio \ *************** *** 264,301 **** EXT=pd_darwin CPPFLAGS="-DDL_OPEN -DMACOSX -DUNISTD -I/usr/X11R6/include \ ! -I../portaudio/include -I../portaudio/src/common \ ! -I../portaudio/src/os/mac_osx/ \ ! -I../portmidi/pm_common -I../portmidi/pm_mac \ ! -I../portmidi/porttime \ ! -DUSEAPI_PORTAUDIO -DPA19 -DPA_USE_COREAUDIO -DNEWBUFFER" if test `uname -r` = 7.9.0; then ! MORECFLAGS="-DMACOSX3 -DPA_BIG_ENDIAN -Wno-error" ! EXTERNTARGET=d_ppc ! else MORECFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ -arch i386 -arch ppc -Wno-error" ! EXTERNTARGET=d_fat LDFLAGS=$LDFLAGS" -arch i386 -arch ppc" fi SYSSRC="s_midi_pm.c s_audio_pa.c \ ! s_audio_pablio.c \ ! s_audio_paring.c \ ! ../portaudio/src/common/pa_allocation.c \ ! ../portaudio/src/common/pa_converters.c \ ! ../portaudio/src/common/pa_cpuload.c \ ! ../portaudio/src/common/pa_dither.c \ ! ../portaudio/src/common/pa_front.c \ ! ../portaudio/src/common/pa_process.c \ ! ../portaudio/src/common/pa_skeleton.c \ ! ../portaudio/src/common/pa_stream.c \ ! ../portaudio/src/common/pa_trace.c \ ! ../portaudio/src/common/pa_debugprint.c \ ! ../portaudio/src/common/pa_ringbuffer.c \ ! ../portaudio/src/os/unix/pa_unix_util.c \ ! ../portaudio/src/os/mac_osx/pa_mac_hostapis.c \ ! ../portaudio/src/hostapi/coreaudio/pa_mac_core.c \ ! ../portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.c \ ! ../portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.c \ ../portmidi/pm_mac/pmmac.c \ ../portmidi/pm_mac/pmmacosxcm.c \ --- 275,317 ---- EXT=pd_darwin CPPFLAGS="-DDL_OPEN -DMACOSX -DUNISTD -I/usr/X11R6/include \ ! -I../portaudio/include -I../portaudio/src/common \ ! -I../portaudio/src/os/mac_osx/ \ ! -I../portmidi/pm_common -I../portmidi/pm_mac \ ! -I../portmidi/porttime \ ! -DUSEAPI_PORTAUDIO -DPA19 -DPA_USE_COREAUDIO -DNEWBUFFER" ! dnl for Mac OS X 10.3 (i.e. < 10.4) if test `uname -r` = 7.9.0; then ! fat="no" ! fi ! if test "x$fat" == "xyes"; ! then MORECFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ -arch i386 -arch ppc -Wno-error" ! EXTERNTARGET=d_fat LDFLAGS=$LDFLAGS" -arch i386 -arch ppc" + else + MORECFLAGS="-DMACOSX3 -DPA_BIG_ENDIAN -Wno-error" + EXTERNTARGET=d_ppc fi SYSSRC="s_midi_pm.c s_audio_pa.c \ ! s_audio_pablio.c \ ! s_audio_paring.c \ ! ../portaudio/src/common/pa_allocation.c \ ! ../portaudio/src/common/pa_converters.c \ ! ../portaudio/src/common/pa_cpuload.c \ ! ../portaudio/src/common/pa_dither.c \ ! ../portaudio/src/common/pa_front.c \ ! ../portaudio/src/common/pa_process.c \ ! ../portaudio/src/common/pa_skeleton.c \ ! ../portaudio/src/common/pa_stream.c \ ! ../portaudio/src/common/pa_trace.c \ ! ../portaudio/src/common/pa_debugprint.c \ ! ../portaudio/src/common/pa_ringbuffer.c \ ! ../portaudio/src/os/unix/pa_unix_util.c \ ! ../portaudio/src/os/mac_osx/pa_mac_hostapis.c \ ! ../portaudio/src/hostapi/coreaudio/pa_mac_core.c \ ! ../portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.c \ ! ../portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.c \ ../portmidi/pm_mac/pmmac.c \ ../portmidi/pm_mac/pmmacosxcm.c \ *************** *** 307,316 ****
# find the Tcl/Tk Frameworks ! if test -d "../../Frameworks"; then # Miller's location TCLTK_FRAMEWORKS_PATH="../../Frameworks" ! elif test -d "/Library/Frameworks"; ! then # get it from the default install location TCLTK_FRAMEWORKS_PATH="/Library/Frameworks" --- 323,332 ----
# find the Tcl/Tk Frameworks ! if test -d "../../Frameworks"; then # Miller's location TCLTK_FRAMEWORKS_PATH="../../Frameworks" ! elif test -d "/Library/Frameworks"; ! then # get it from the default install location TCLTK_FRAMEWORKS_PATH="/Library/Frameworks" *************** *** 318,338 **** # Panther has Tcl here; Tiger has Tcl and Tk here TCLTK_FRAMEWORKS_PATH="/System/Library/Frameworks" ! fi GUIFLAGS="-F$TCLTK_FRAMEWORKS_PATH -framework Tcl -framework Tk \ -I$TCLTK_FRAMEWORKS_PATH/Tk.framework/Versions/Current/Headers \ -I$TCLTK_FRAMEWORKS_PATH/Tcl.framework/Versions/Current/Headers \ -I$TCLTK_FRAMEWORKS_PATH/Tcl.framework/Versions/8.4/PrivateHeaders" ! if test x$USE_DEBUG_CFLAGS == "xyes"; then ! MORECFLAGS=$MORECFLAGS" -g" else ! MORECFLAGS=$MORECFLAGS" -O2" fi OSNUMBER=2 ! if test x$jack == "xyes"; then ! LDFLAGS=$LDFLAGS" -weak_framework Jack" fi ! if test x$jack == "xrun"; then LDFLAGS=$LDFLAGS" -weak_framework Jack" --- 334,354 ---- # Panther has Tcl here; Tiger has Tcl and Tk here TCLTK_FRAMEWORKS_PATH="/System/Library/Frameworks" ! fi GUIFLAGS="-F$TCLTK_FRAMEWORKS_PATH -framework Tcl -framework Tk \ -I$TCLTK_FRAMEWORKS_PATH/Tk.framework/Versions/Current/Headers \ -I$TCLTK_FRAMEWORKS_PATH/Tcl.framework/Versions/Current/Headers \ -I$TCLTK_FRAMEWORKS_PATH/Tcl.framework/Versions/8.4/PrivateHeaders" ! if test x$USE_DEBUG_CFLAGS = "xyes"; then ! MORECFLAGS=$MORECFLAGS" -g" else ! MORECFLAGS=$MORECFLAGS" -O2" fi OSNUMBER=2 ! if test x$jack = "xyes"; then ! LDFLAGS=$LDFLAGS" -weak_framework Jack" fi ! if test x$jack = "xrun"; then LDFLAGS=$LDFLAGS" -weak_framework Jack" *************** *** 343,352 **** ASIOSRC=
! if test `uname -s` == MINGW32_NT-5.0; then EXT=dll MORECFLAGS="-DUSEAPI_PORTAUDIO -DPA19 -DMSW -DPA_NO_DS -DPD_INTERNAL \ -I../portaudio/include -I../portaudio/src/common \ ! -I../portaudio/src/os/win/ \ -mwindows -mms-bitfields "$MORECFLAGS PDLIB=$PDLIB" -lwsock32 -lwinmm -lole32 -lstdc++" --- 359,368 ---- ASIOSRC=
! if test `uname -s` = MINGW32_NT-5.0; then EXT=dll MORECFLAGS="-DUSEAPI_PORTAUDIO -DPA19 -DMSW -DPA_NO_DS -DPD_INTERNAL \ -I../portaudio/include -I../portaudio/src/common \ ! -I../portaudio/src/os/win/ \ -mwindows -mms-bitfields "$MORECFLAGS PDLIB=$PDLIB" -lwsock32 -lwinmm -lole32 -lstdc++" *************** *** 354,375 **** SYSSRC="s_audio_pa.c s_audio_pablio.c s_audio_paring.c \ s_audio_mmio.c s_midi_mmio.c \ ! ../portaudio/src/common/pa_allocation.c \ ! ../portaudio/src/common/pa_converters.c \ ! ../portaudio/src/common/pa_cpuload.c \ ! ../portaudio/src/common/pa_dither.c \ ! ../portaudio/src/common/pa_front.c \ ! ../portaudio/src/common/pa_process.c \ ! ../portaudio/src/common/pa_skeleton.c \ ! ../portaudio/src/common/pa_stream.c \ ! ../portaudio/src/common/pa_trace.c \ ! ../portaudio/src/common/pa_debugprint.c \ ! ../portaudio/src/common/pa_ringbuffer.c \ ../portaudio/src/os/win/pa_win_util.c \ ../portaudio/src/os/win/pa_win_hostapis.c \ ../portaudio/src/os/win/pa_x86_plain_converters.c \ ../portaudio/src/hostapi/wmme/pa_win_wmme.c" ! ASIOSRC="../portaudio/src/hostapi/asio/iasiothiscallresolver.cpp \ ! ../portaudio/src/hostapi/pa_asio/asio.cpp ../asio/asio.cpp \ ! ../asio/asiodrivers.cpp ../asio/asiolist.cpp" STRIPFLAG="--strip-unneeded" GUINAME="pdtcl.dll" --- 370,391 ---- SYSSRC="s_audio_pa.c s_audio_pablio.c s_audio_paring.c \ s_audio_mmio.c s_midi_mmio.c \ ! ../portaudio/src/common/pa_allocation.c \ ! ../portaudio/src/common/pa_converters.c \ ! ../portaudio/src/common/pa_cpuload.c \ ! ../portaudio/src/common/pa_dither.c \ ! ../portaudio/src/common/pa_front.c \ ! ../portaudio/src/common/pa_process.c \ ! ../portaudio/src/common/pa_skeleton.c \ ! ../portaudio/src/common/pa_stream.c \ ! ../portaudio/src/common/pa_trace.c \ ! ../portaudio/src/common/pa_debugprint.c \ ! ../portaudio/src/common/pa_ringbuffer.c \ ../portaudio/src/os/win/pa_win_util.c \ ../portaudio/src/os/win/pa_win_hostapis.c \ ../portaudio/src/os/win/pa_x86_plain_converters.c \ ../portaudio/src/hostapi/wmme/pa_win_wmme.c" ! ASIOSRC="../portaudio/src/hostapi/asio/iasiothiscallresolver.cpp \ ! ../portaudio/src/hostapi/pa_asio/asio.cpp ../asio/asio.cpp \ ! ../asio/asiodrivers.cpp ../asio/asiolist.cpp" STRIPFLAG="--strip-unneeded" GUINAME="pdtcl.dll" *************** *** 379,388 **** # support for jack, on either linux or darwin:
! if test x$jack == "xyes"; then MORECFLAGS=$MORECFLAGS" -DUSEAPI_JACK" SYSSRC=$SYSSRC" s_audio_jack.c" fi ! if test x$jack == "xrun"; then MORECFLAGS=$MORECFLAGS" -DUSEAPI_JACK -DJACK_XRUN" --- 395,404 ---- # support for jack, on either linux or darwin:
! if test x$jack = "xyes"; then MORECFLAGS=$MORECFLAGS" -DUSEAPI_JACK" SYSSRC=$SYSSRC" s_audio_jack.c" fi ! if test x$jack = "xrun"; then MORECFLAGS=$MORECFLAGS" -DUSEAPI_JACK -DJACK_XRUN" *************** *** 390,394 **** fi
! if test x$fftw == "xyes"; then SYSSRC=$SYSSRC" d_fft_fftw.c d_fftroutine.c" --- 406,410 ---- fi
! if test x$fftw = "xyes"; then SYSSRC=$SYSSRC" d_fft_fftw.c d_fftroutine.c"
Index: g_vdial.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_vdial.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** g_vdial.c 8 Sep 2006 23:45:30 -0000 1.6 --- g_vdial.c 28 Dec 2007 03:43:04 -0000 1.7 *************** *** 76,83 **** } sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxLABEL\n", canvas, xx11+x->x_gui.x_ldx, yy11b+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) --- 76,83 ---- } sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxLABEL\n", canvas, xx11+x->x_gui.x_ldx, yy11b+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) *************** *** 142,147 **** int n=x->x_number, i;
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); --- 142,147 ---- int n=x->x_number, i;
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); *************** *** 266,270 **** if(pd_class(&x->x_gui.x_obj.ob_pd) == vradio_old_class) hchange = x->x_change; ! sprintf(buf, "pdtk_iemgui_dialog %%s vradio \ ----------dimensions(pix):----------- %d %d size: 0 0 empty \ empty 0.0 empty 0.0 empty %d \ --- 266,270 ---- if(pd_class(&x->x_gui.x_obj.ob_pd) == vradio_old_class) hchange = x->x_change; ! sprintf(buf, "pdtk_iemgui_dialog %%s |vradio| \ ----------dimensions(pix):----------- %d %d size: 0 0 empty \ empty 0.0 empty 0.0 empty %d \ *************** *** 348,352 **** if((x->x_change)&&(x->x_on != x->x_on_old)) { ! SETFLOAT(x->x_at, (float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 348,352 ---- if((x->x_change)&&(x->x_on != x->x_on_old)) { ! SETFLOAT(x->x_at, (t_float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 355,359 **** } x->x_on_old = x->x_on; ! SETFLOAT(x->x_at, (float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 355,359 ---- } x->x_on_old = x->x_on; ! SETFLOAT(x->x_at, (t_float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 383,387 **** if((x->x_change)&&(i != x->x_on_old)) { ! SETFLOAT(x->x_at, (float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 383,387 ---- if((x->x_change)&&(i != x->x_on_old)) { ! SETFLOAT(x->x_at, (t_float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 394,398 **** (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE); x->x_on_old = x->x_on; ! SETFLOAT(x->x_at, (float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 394,398 ---- (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE); x->x_on_old = x->x_on; ! SETFLOAT(x->x_at, (t_float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 427,431 **** if(x->x_gui.x_fsf.x_put_in2out) { ! SETFLOAT(x->x_at, (float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 427,431 ---- if(x->x_gui.x_fsf.x_put_in2out) { ! SETFLOAT(x->x_at, (t_float)x->x_on_old); SETFLOAT(x->x_at+1, 0.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 441,445 **** if(x->x_gui.x_fsf.x_put_in2out) { ! SETFLOAT(x->x_at, (float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); --- 441,445 ---- if(x->x_gui.x_fsf.x_put_in2out) { ! SETFLOAT(x->x_at, (t_float)x->x_on); SETFLOAT(x->x_at+1, 1.0); outlet_list(x->x_gui.x_obj.ob_outlet, &s_list, 2, x->x_at); *************** *** 467,471 **** int yy = (int)ypos - text_ypix(&x->x_gui.x_obj, x->x_gui.x_glist);
! vradio_fout(x, (float)(yy / x->x_gui.x_h)); }
--- 467,471 ---- int yy = (int)ypos - text_ypix(&x->x_gui.x_obj, x->x_gui.x_glist);
! vradio_fout(x, (t_float)(yy / x->x_gui.x_h)); }
*************** *** 591,595 **** else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, "courier"); } if(num < 1) num = 1; --- 591,595 ---- else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, sys_font); } if(num < 1) num = 1;
Index: s_inter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** s_inter.c 18 Aug 2007 23:32:44 -0000 1.20 --- s_inter.c 28 Dec 2007 03:43:06 -0000 1.21 *************** *** 91,95 **** extern char *pd_version; extern int sys_guisetportnumber; - extern char sys_font[]; /* tb: typeface */
static int sys_nfdpoll; --- 91,94 ---- *************** *** 850,854 **** #define FIRSTPORTNUM 5400
! static int defaultfontshit[] = { 8, 5, 9, 10, 6, 10, 12, 7, 13, 14, 9, 17, 16, 10, 19, 24, 15, 28, 24, 15, 28}; --- 849,854 ---- #define FIRSTPORTNUM 5400
! #define MAXFONTS 21 ! static int defaultfontshit[MAXFONTS] = { 8, 5, 9, 10, 6, 10, 12, 7, 13, 14, 9, 17, 16, 10, 19, 24, 15, 28, 24, 15, 28}; *************** *** 1238,1242 **** (socklen_t *)&len); #ifdef OOPS ! close(xsock); #endif if (sys_guisock < 0) sys_sockerror("accept"); --- 1238,1242 ---- (socklen_t *)&len); #ifdef OOPS ! sys_closesocket(xsock); #endif if (sys_guisock < 0) sys_sockerror("accept"); *************** *** 1258,1263 **** sys_get_audio_apis(buf); sys_get_midi_apis(buf2); ! sys_vgui("pdtk_pd_startup {%s} %s %s {%s}\n", pd_version, buf, buf2, ! sys_font); } return (0); --- 1258,1263 ---- sys_get_audio_apis(buf); sys_get_midi_apis(buf2); ! sys_vgui("pdtk_pd_startup {%s} %s %s {%s} %s\n", pd_version, buf, buf2, ! sys_font, sys_fontweight); } return (0); *************** *** 1293,1297 **** if (!sys_nogui) { ! close(sys_guisock); sys_rmpollfn(sys_guisock); } --- 1293,1297 ---- if (!sys_nogui) { ! sys_closesocket(sys_guisock); sys_rmpollfn(sys_guisock); }
Index: d_delay.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_delay.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** d_delay.c 28 Nov 2004 21:20:42 -0000 1.3 --- d_delay.c 28 Dec 2007 03:43:03 -0000 1.4 *************** *** 17,21 **** { int c_n; ! float *c_vec; int c_phase; } t_delwritectl; --- 17,21 ---- { int c_n; ! t_sample *c_vec; int c_phase; } t_delwritectl; *************** *** 29,33 **** int x_rsortno; /* DSP sort # for first delread or write in chain */ int x_vecsize; /* vector size for delread~ to use */ ! float x_f; } t_sigdelwrite;
--- 29,33 ---- int x_rsortno; /* DSP sort # for first delread or write in chain */ int x_vecsize; /* vector size for delread~ to use */ ! t_float x_f; } t_sigdelwrite;
*************** *** 60,64 **** 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)); --- 60,64 ---- pd_bind(&x->x_obj.ob_pd, s); x->x_sym = s; ! nsamps = msec * sys_getsr() * (t_float)(0.001f); if (nsamps < 1) nsamps = 1; nsamps += ((- nsamps) & (SAMPBLK - 1)); *************** *** 66,70 **** x->x_cspace.c_n = nsamps; x->x_cspace.c_vec = ! (float *)getbytes((nsamps + XTRASAMPS) * sizeof(float)); x->x_cspace.c_phase = XTRASAMPS; x->x_sortno = 0; --- 66,70 ---- x->x_cspace.c_n = nsamps; x->x_cspace.c_vec = ! (t_sample *)getbytes((nsamps + XTRASAMPS) * sizeof(t_sample)); x->x_cspace.c_phase = XTRASAMPS; x->x_sortno = 0; *************** *** 76,88 **** static t_int *sigdelwrite_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); t_delwritectl *c = (t_delwritectl *)(w[2]); int n = (int)(w[3]); int phase = c->c_phase, nsamps = c->c_n; ! float *vp = c->c_vec, *bp = vp + phase, *ep = vp + (c->c_n + XTRASAMPS); phase += n; while (n--) { ! float f = *in++; if (PD_BIGORSMALL(f)) f = 0; --- 76,89 ---- static t_int *sigdelwrite_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); t_delwritectl *c = (t_delwritectl *)(w[2]); int n = (int)(w[3]); int phase = c->c_phase, nsamps = c->c_n; ! t_sample *vp = c->c_vec, *bp = vp + phase, *ep = vp + (c->c_n + XTRASAMPS); phase += n; + while (n--) { ! t_sample f = *in++; if (PD_BIGORSMALL(f)) f = 0; *************** *** 98,101 **** --- 99,104 ---- } } + bp = vp + c->c_phase; + c->c_phase = phase; return (w+4); *************** *** 113,117 **** pd_unbind(&x->x_obj.ob_pd, x->x_sym); freebytes(x->x_cspace.c_vec, ! (x->x_cspace.c_n + XTRASAMPS) * sizeof(float)); }
--- 116,120 ---- pd_unbind(&x->x_obj.ob_pd, x->x_sym); freebytes(x->x_cspace.c_vec, ! (x->x_cspace.c_n + XTRASAMPS) * sizeof(t_sample)); }
*************** *** 173,185 **** static t_int *sigdelread_perform(t_int *w) { ! t_float *out = (t_float *)(w[1]); t_delwritectl *c = (t_delwritectl *)(w[2]); int delsamps = *(int *)(w[3]); int n = (int)(w[4]); int phase = c->c_phase - delsamps, nsamps = c->c_n; ! float *vp = c->c_vec, *bp, *ep = vp + (c->c_n + XTRASAMPS); ! if (phase < 0) phase += nsamps; bp = vp + phase; while (n--) { --- 176,188 ---- static t_int *sigdelread_perform(t_int *w) { ! t_sample *out = (t_sample *)(w[1]); t_delwritectl *c = (t_delwritectl *)(w[2]); int delsamps = *(int *)(w[3]); int n = (int)(w[4]); int phase = c->c_phase - delsamps, nsamps = c->c_n; ! t_sample *vp = c->c_vec, *bp, *ep = vp + (c->c_n + XTRASAMPS); if (phase < 0) phase += nsamps; bp = vp + phase; + while (n--) { *************** *** 229,233 **** t_float x_sr; /* samples per msec */ int x_zerodel; /* 0 or vecsize depending on read/write order */ ! float x_f; } t_sigvd;
--- 232,236 ---- t_float x_sr; /* samples per msec */ int x_zerodel; /* 0 or vecsize depending on read/write order */ ! t_float x_f; } t_sigvd;
*************** *** 246,251 **** static t_int *sigvd_perform(t_int *w) { ! t_float *in = (t_float *)(w[1]); ! t_float *out = (t_float *)(w[2]); t_delwritectl *ctl = (t_delwritectl *)(w[3]); t_sigvd *x = (t_sigvd *)(w[4]); --- 249,254 ---- static t_int *sigvd_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); t_delwritectl *ctl = (t_delwritectl *)(w[3]); t_sigvd *x = (t_sigvd *)(w[4]); *************** *** 253,265 ****
int nsamps = ctl->c_n; ! float limit = nsamps - n - 1; ! float fn = n-1; ! float *vp = ctl->c_vec, *bp, *wp = vp + ctl->c_phase; ! float zerodel = x->x_zerodel; while (n--) { ! float delsamps = x->x_sr * *in++ - zerodel, frac; int idelsamps; ! float a, b, c, d, cminusb; if (delsamps < 1.00001f) delsamps = 1.00001f; if (delsamps > limit) delsamps = limit; --- 256,268 ----
int nsamps = ctl->c_n; ! t_sample limit = nsamps - n - 1; ! t_sample fn = n-1; ! t_sample *vp = ctl->c_vec, *bp, *wp = vp + ctl->c_phase; ! t_sample zerodel = x->x_zerodel; while (n--) { ! t_sample delsamps = x->x_sr * *in++ - zerodel, frac; int idelsamps; ! t_sample a, b, c, d, cminusb; if (delsamps < 1.00001f) delsamps = 1.00001f; if (delsamps > limit) delsamps = limit; *************** *** 267,271 **** fn = fn - 1.0f; idelsamps = delsamps; ! frac = delsamps - (float)idelsamps; bp = wp - idelsamps; if (bp < vp + 4) bp += nsamps; --- 270,274 ---- fn = fn - 1.0f; idelsamps = delsamps; ! frac = delsamps - (t_sample)idelsamps; bp = wp - idelsamps; if (bp < vp + 4) bp += nsamps;
Index: d_fft.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_fft.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** d_fft.c 3 Jun 2006 19:13:07 -0000 1.4 --- d_fft.c 28 Dec 2007 03:43:03 -0000 1.5 *************** *** 17,26 **** static t_int *sigfft_swap(t_int *w) { ! float *in1 = (t_float *)(w[1]); ! float *in2 = (t_float *)(w[2]); int n = w[3]; for (;n--; in1++, in2++) { ! float f = *in1; *in1 = *in2; *in2 = f; --- 17,26 ---- static t_int *sigfft_swap(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); int n = w[3]; for (;n--; in1++, in2++) { ! t_sample f = *in1; *in1 = *in2; *in2 = f; *************** *** 35,40 **** static t_int *sigrfft_flip(t_int *w) { ! float *in = (t_float *)(w[1]); ! float *out = (t_float *)(w[2]); int n = w[3]; while (n--) --- 35,40 ---- static t_int *sigrfft_flip(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); int n = w[3]; while (n--) *************** *** 49,53 **** { t_object x_obj; ! float x_f; } t_sigfft;
--- 49,53 ---- { t_object x_obj; ! t_float x_f; } t_sigfft;
*************** *** 74,79 **** static t_int *sigfft_perform(t_int *w) { ! float *in1 = (t_float *)(w[1]); ! float *in2 = (t_float *)(w[2]); int n = w[3]; mayer_fft(n, in1, in2); --- 74,79 ---- static t_int *sigfft_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); int n = w[3]; mayer_fft(n, in1, in2); *************** *** 83,88 **** static t_int *sigifft_perform(t_int *w) { ! float *in1 = (t_float *)(w[1]); ! float *in2 = (t_float *)(w[2]); int n = w[3]; mayer_ifft(n, in1, in2); --- 83,88 ---- static t_int *sigifft_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); int n = w[3]; mayer_ifft(n, in1, in2); *************** *** 93,100 **** { int n = sp[0]->s_n; ! float *in1 = sp[0]->s_vec; ! float *in2 = sp[1]->s_vec; ! float *out1 = sp[2]->s_vec; ! float *out2 = sp[3]->s_vec; if (out1 == in2 && out2 == in1) dsp_add(sigfft_swap, 3, out1, out2, n); --- 93,100 ---- { int n = sp[0]->s_n; ! t_sample *in1 = sp[0]->s_vec; ! t_sample *in2 = sp[1]->s_vec; ! t_sample *out1 = sp[2]->s_vec; ! t_sample *out2 = sp[3]->s_vec; if (out1 == in2 && out2 == in1) dsp_add(sigfft_swap, 3, out1, out2, n); *************** *** 143,147 **** { t_object x_obj; ! float x_f; } t_sigrfft;
--- 143,147 ---- { t_object x_obj; ! t_float x_f; } t_sigrfft;
*************** *** 157,161 **** static t_int *sigrfft_perform(t_int *w) { ! float *in = (t_float *)(w[1]); int n = w[2]; mayer_realfft(n, in); --- 157,161 ---- static t_int *sigrfft_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); int n = w[2]; mayer_realfft(n, in); *************** *** 166,172 **** { int n = sp[0]->s_n, n2 = (n>>1); ! float *in1 = sp[0]->s_vec; ! float *out1 = sp[1]->s_vec; ! float *out2 = sp[2]->s_vec; if (n < 4) { --- 166,172 ---- { int n = sp[0]->s_n, n2 = (n>>1); ! t_sample *in1 = sp[0]->s_vec; ! t_sample *out1 = sp[1]->s_vec; ! t_sample *out2 = sp[2]->s_vec; if (n < 4) { *************** *** 200,204 **** { t_object x_obj; ! float x_f; } t_sigrifft;
--- 200,204 ---- { t_object x_obj; ! t_float x_f; } t_sigrifft;
*************** *** 214,218 **** static t_int *sigrifft_perform(t_int *w) { ! float *in = (t_float *)(w[1]); int n = w[2]; mayer_realifft(n, in); --- 214,218 ---- static t_int *sigrifft_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); int n = w[2]; mayer_realifft(n, in); *************** *** 223,229 **** { int n = sp[0]->s_n, n2 = (n>>1); ! float *in1 = sp[0]->s_vec; ! float *in2 = sp[1]->s_vec; ! float *out1 = sp[2]->s_vec; if (n < 4) { --- 223,229 ---- { int n = sp[0]->s_n, n2 = (n>>1); ! t_sample *in1 = sp[0]->s_vec; ! t_sample *in2 = sp[1]->s_vec; ! t_sample *out1 = sp[2]->s_vec; if (n < 4) { *************** *** 260,264 **** { t_object x_obj; ! float x_f; } t_sigframp;
--- 260,264 ---- { t_object x_obj; ! t_float x_f; } t_sigframp;
*************** *** 275,287 **** static t_int *sigframp_perform(t_int *w) { ! float *inreal = (t_float *)(w[1]); ! float *inimag = (t_float *)(w[2]); ! float *outfreq = (t_float *)(w[3]); ! float *outamp = (t_float *)(w[4]); ! float lastreal = 0, currentreal = inreal[0], nextreal = inreal[1]; ! float lastimag = 0, currentimag = inimag[0], nextimag = inimag[1]; int n = w[5]; int m = n + 1; ! float fbin = 1, oneovern2 = 1.f/((float)n * (float)n);
inreal += 2; --- 275,287 ---- static t_int *sigframp_perform(t_int *w) { ! t_sample *inreal = (t_sample *)(w[1]); ! t_sample *inimag = (t_sample *)(w[2]); ! t_sample *outfreq = (t_sample *)(w[3]); ! t_sample *outamp = (t_sample *)(w[4]); ! t_sample lastreal = 0, currentreal = inreal[0], nextreal = inreal[1]; ! t_sample lastimag = 0, currentimag = inimag[0], nextimag = inimag[1]; int n = w[5]; int m = n + 1; ! t_sample fbin = 1, oneovern2 = 1.f/((t_sample)n * (t_sample)n);
inreal += 2; *************** *** 291,295 **** while (n--) { ! float re, im, pow, freq; lastreal = currentreal; currentreal = nextreal; --- 291,295 ---- while (n--) { ! t_sample re, im, pow, freq; lastreal = currentreal; currentreal = nextreal; *************** *** 303,307 **** if (pow > 1e-19) { ! float detune = ((lastreal - nextreal) * re + (lastimag - nextimag) * im) / (2.0f * pow); if (detune > 2 || detune < -2) freq = pow = 0; --- 303,307 ---- if (pow > 1e-19) { ! t_sample detune = ((lastreal - nextreal) * re + (lastimag - nextimag) * im) / (2.0f * pow); if (detune > 2 || detune < -2) freq = pow = 0;
Index: m_pd.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** m_pd.h 18 Aug 2007 23:32:43 -0000 1.20 --- m_pd.h 28 Dec 2007 03:43:05 -0000 1.21 *************** *** 12,16 **** #define PD_MINOR_VERSION 41 #define PD_BUGFIX_VERSION 0 ! #define PD_TEST_VERSION "test06"
/* old name for "MSW" flag -- we have to take it for the sake of many old --- 12,16 ---- #define PD_MINOR_VERSION 41 #define PD_BUGFIX_VERSION 0 ! #define PD_TEST_VERSION "test10"
/* old name for "MSW" flag -- we have to take it for the sake of many old *************** *** 369,372 **** --- 369,374 ---- char *result,int resultsize); EXTERN t_symbol *canvas_getdir(t_glist *x); + EXTERN char sys_font[]; /* default typeface set in s_main.c */ + EXTERN char sys_fontweight[]; /* default font weight set in s_main.c */ EXTERN int sys_fontwidth(int fontsize); EXTERN int sys_fontheight(int fontsize); *************** *** 480,484 **** int s_n; /* number of points in the array */ t_sample *s_vec; /* the array */ ! float s_sr; /* sample rate */ int s_refcount; /* number of times used */ int s_isborrowed; /* whether we're going to borrow our array */ --- 482,486 ---- int s_n; /* number of points in the array */ t_sample *s_vec; /* the array */ ! t_float s_sr; /* sample rate */ int s_refcount; /* number of times used */ int s_isborrowed; /* whether we're going to borrow our array */ *************** *** 497,505 **** EXTERN void dsp_add_plus(t_sample *in1, t_sample *in2, t_sample *out, int n); EXTERN void dsp_add_copy(t_sample *in, t_sample *out, int n); ! EXTERN void dsp_add_scalarcopy(t_sample *in, t_sample *out, int n); EXTERN void dsp_add_zero(t_sample *out, int n);
EXTERN int sys_getblksize(void); ! EXTERN float sys_getsr(void); EXTERN int sys_get_inchannels(void); EXTERN int sys_get_outchannels(void); --- 499,507 ---- EXTERN void dsp_add_plus(t_sample *in1, t_sample *in2, t_sample *out, int n); EXTERN void dsp_add_copy(t_sample *in, t_sample *out, int n); ! EXTERN void dsp_add_scalarcopy(t_float *in, t_sample *out, int n); EXTERN void dsp_add_zero(t_sample *out, int n);
EXTERN int sys_getblksize(void); ! EXTERN t_float sys_getsr(void); EXTERN int sys_get_inchannels(void); EXTERN int sys_get_outchannels(void); *************** *** 507,518 **** EXTERN void dsp_add(t_perfroutine f, int n, ...); EXTERN void dsp_addv(t_perfroutine f, int n, t_int *vec); ! EXTERN void pd_fft(float *buf, int npoints, int inverse); EXTERN int ilog2(int n);
! EXTERN void mayer_fht(float *fz, int n); ! EXTERN void mayer_fft(int n, float *real, float *imag); ! EXTERN void mayer_ifft(int n, float *real, float *imag); ! EXTERN void mayer_realfft(int n, float *real); ! EXTERN void mayer_realifft(int n, float *real);
EXTERN float *cos_table; --- 509,520 ---- EXTERN void dsp_add(t_perfroutine f, int n, ...); EXTERN void dsp_addv(t_perfroutine f, int n, t_int *vec); ! EXTERN void pd_fft(t_float *buf, int npoints, int inverse); EXTERN int ilog2(int n);
! EXTERN void mayer_fht(t_sample *fz, int n); ! EXTERN void mayer_fft(int n, t_sample *real, t_sample *imag); ! EXTERN void mayer_ifft(int n, t_sample *real, t_sample *imag); ! EXTERN void mayer_realfft(int n, t_sample *real); ! EXTERN void mayer_realifft(int n, t_sample *real);
EXTERN float *cos_table; *************** *** 533,543 **** t_int upsample; /* upsampling factor */
! t_float *s_vec; /* here we hold the resampled data */ int s_n;
! t_float *coeffs; /* coefficients for filtering... */ int coefsize;
! t_float *buffer; /* buffer for filtering */ int bufsize; } t_resample; --- 535,545 ---- t_int upsample; /* upsampling factor */
! t_sample *s_vec; /* here we hold the resampled data */ int s_n;
! t_sample *coeffs; /* coefficients for filtering... */ int coefsize;
! t_sample *buffer; /* buffer for filtering */ int bufsize; } t_resample; *************** *** 551,566 ****
/* ----------------------- utility functions for signals -------------- */ ! EXTERN float mtof(float); ! EXTERN float ftom(float); ! EXTERN float rmstodb(float); ! EXTERN float powtodb(float); ! EXTERN float dbtorms(float); ! EXTERN float dbtopow(float);
! EXTERN float q8_sqrt(float); ! EXTERN float q8_rsqrt(float); #ifndef N32 ! EXTERN float qsqrt(float); /* old names kept for extern compatibility */ ! EXTERN float qrsqrt(float); #endif /* --------------------- data --------------------------------- */ --- 553,568 ----
/* ----------------------- utility functions for signals -------------- */ ! EXTERN t_float mtof(t_float); ! EXTERN t_float ftom(t_float); ! EXTERN t_float rmstodb(t_float); ! EXTERN t_float powtodb(t_float); ! EXTERN t_float dbtorms(t_float); ! EXTERN t_float dbtopow(t_float);
! EXTERN t_float q8_sqrt(t_float); ! EXTERN t_float q8_rsqrt(t_float); #ifndef N32 ! EXTERN t_float qsqrt(t_float); /* old names kept for extern compatibility */ ! EXTERN t_float qrsqrt(t_float); #endif /* --------------------- data --------------------------------- */ *************** *** 573,577 **** EXTERN int garray_getfloatarray(t_garray *x, int *size, t_float **vec); EXTERN int garray_getfloatwords(t_garray *x, int *size, t_word **vec); ! EXTERN float garray_get(t_garray *x, t_symbol *s, t_int indx); EXTERN void garray_redraw(t_garray *x); EXTERN int garray_npoints(t_garray *x); --- 575,579 ---- EXTERN int garray_getfloatarray(t_garray *x, int *size, t_float **vec); EXTERN int garray_getfloatwords(t_garray *x, int *size, t_word **vec); ! EXTERN t_float garray_get(t_garray *x, t_symbol *s, t_int indx); EXTERN void garray_redraw(t_garray *x); EXTERN int garray_npoints(t_garray *x); *************** *** 623,627 **** #define PD_USE_TE_XPIX
- #if defined(__i386__) || defined(__x86_64__) /* a test for NANs and denormals. Should only be necessary on i386. */ --- 625,628 ----
Index: g_graph.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_graph.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** g_graph.c 22 Oct 2006 21:46:11 -0000 1.11 --- g_graph.c 28 Dec 2007 03:43:04 -0000 1.12 *************** *** 182,190 **** }
! static float gobj_getxforsort(t_gobj *g) { if (pd_class(&g->g_pd) == scalar_class) { ! float x1, y1; scalar_getbasexy((t_scalar *)g, &x1, &y1); return(x1); --- 182,190 ---- }
! static t_float gobj_getxforsort(t_gobj *g) { if (pd_class(&g->g_pd) == scalar_class) { ! t_float x1, y1; scalar_getbasexy((t_scalar *)g, &x1, &y1); return(x1); *************** *** 196,200 **** { t_gobj *g = 0, *g9 = 0; ! float f1 = 0, f2 = 0; if (g1) f1 = gobj_getxforsort(g1); --- 196,200 ---- { t_gobj *g = 0, *g9 = 0; ! t_float f1 = 0, f2 = 0; if (g1) f1 = gobj_getxforsort(g1); *************** *** 258,266 **** { int nitems = 0, foo = 0; ! float lastx = -1e37; t_gobj *g; for (g = x->gl_list; g; g = g->g_next) { ! float x1 = gobj_getxforsort(g); if (x1 < lastx) foo = 1; --- 258,266 ---- { int nitems = 0, foo = 0; ! t_float lastx = -1e37; t_gobj *g; for (g = x->gl_list; g; g = g->g_next) { ! t_float x1 = gobj_getxforsort(g); if (x1 < lastx) foo = 1; *************** *** 506,510 ****
/* convert an x pixel value to an x coordinate value */ ! float glist_pixelstox(t_glist *x, float xpix) { /* if we appear as a text box on parent, our range in our --- 506,510 ----
/* convert an x pixel value to an x coordinate value */ ! t_float glist_pixelstox(t_glist *x, t_float xpix) { /* if we appear as a text box on parent, our range in our *************** *** 534,538 **** }
! float glist_pixelstoy(t_glist *x, float ypix) { if (!x->gl_isgraph) --- 534,538 ---- }
! t_float glist_pixelstoy(t_glist *x, t_float ypix) { if (!x->gl_isgraph) *************** *** 553,557 ****
/* convert an x coordinate value to an x pixel location in window */ ! float glist_xtopixels(t_glist *x, float xval) { if (!x->gl_isgraph) --- 553,557 ----
/* convert an x coordinate value to an x pixel location in window */ ! t_float glist_xtopixels(t_glist *x, t_float xval) { if (!x->gl_isgraph) *************** *** 570,574 **** }
! float glist_ytopixels(t_glist *x, float yval) { if (!x->gl_isgraph) --- 570,574 ---- }
! t_float glist_ytopixels(t_glist *x, t_float yval) { if (!x->gl_isgraph) *************** *** 590,599 **** This is terribly inefficient; but probably not a big enough CPU hog to warrant optimizing. */ ! float glist_dpixtodx(t_glist *x, float dxpix) { return (dxpix * (glist_pixelstox(x, 1) - glist_pixelstox(x, 0))); }
! float glist_dpixtody(t_glist *x, float dypix) { return (dypix * (glist_pixelstoy(x, 1) - glist_pixelstoy(x, 0))); --- 590,599 ---- This is terribly inefficient; but probably not a big enough CPU hog to warrant optimizing. */ ! t_float glist_dpixtodx(t_glist *x, t_float dxpix) { return (dxpix * (glist_pixelstox(x, 1) - glist_pixelstox(x, 0))); }
! t_float glist_dpixtody(t_glist *x, t_float dypix) { return (dypix * (glist_pixelstoy(x, 1) - glist_pixelstoy(x, 0))); *************** *** 724,728 **** { int i; ! float f; t_gobj *g; t_symbol *arrayname; --- 724,728 ---- { int i; ! t_float f; t_gobj *g; t_symbol *arrayname; *************** *** 742,748 **** i -= sys_fontheight(glist_getfont(x)); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor nw\ ! -font -*-courier-bold--normal--%d-* -tags %s\n", ! (long)glist_getcanvas(x), x1, i, arrayname->s_name, ! sys_hostfontsize(glist_getfont(x)), tag); }
--- 742,748 ---- i -= sys_fontheight(glist_getfont(x)); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor nw\ ! -font {{%s} -%d %s} -tags %s\n", ! (long)glist_getcanvas(x), x1, i, arrayname->s_name, sys_font, ! sys_hostfontsize(glist_getfont(x)), sys_fontweight, tag); }
*************** *** 751,755 **** if (x->gl_xtick.k_lperb) { ! float upix, lpix; if (y2 < y1) upix = y1, lpix = y2; --- 751,755 ---- if (x->gl_xtick.k_lperb) { ! t_float upix, lpix; if (y2 < y1) upix = y1, lpix = y2; *************** *** 788,792 **** if (x->gl_ytick.k_lperb) { ! float ubound, lbound; if (x->gl_y2 < x->gl_y1) ubound = x->gl_y1, lbound = x->gl_y2; --- 788,792 ---- if (x->gl_ytick.k_lperb) { ! t_float ubound, lbound; if (x->gl_y2 < x->gl_y1) ubound = x->gl_y1, lbound = x->gl_y2; *************** *** 824,842 **** for (i = 0; i < x->gl_nxlabels; i++) sys_vgui(".x%lx.c create text\ ! %d %d -text {%s} -font -*-courier-bold--normal--%d-* -tags %s\n", glist_getcanvas(x), (int)glist_xtopixels(x, atof(x->gl_xlabel[i]->s_name)), ! (int)glist_ytopixels(x, x->gl_xlabely), x->gl_xlabel[i]->s_name, ! glist_getfont(x), tag);
/* draw y labels */ for (i = 0; i < x->gl_nylabels; i++) sys_vgui(".x%lx.c create text\ ! %d %d -text {%s} -font -*-courier-bold--normal--%d-* -tags %s\n", glist_getcanvas(x), (int)glist_xtopixels(x, x->gl_ylabelx), (int)glist_ytopixels(x, atof(x->gl_ylabel[i]->s_name)), ! x->gl_ylabel[i]->s_name, ! glist_getfont(x), tag);
/* draw contents of graph as glist */ --- 824,843 ---- for (i = 0; i < x->gl_nxlabels; i++) sys_vgui(".x%lx.c create text\ ! %d %d -text {%s} -font {{%s} -%d %s} -tags %s\n", glist_getcanvas(x), (int)glist_xtopixels(x, atof(x->gl_xlabel[i]->s_name)), ! (int)glist_ytopixels(x, x->gl_xlabely), ! x->gl_xlabel[i]->s_name, sys_font, ! glist_getfont(x), sys_fontweight, tag);
/* draw y labels */ for (i = 0; i < x->gl_nylabels; i++) sys_vgui(".x%lx.c create text\ ! %d %d -text {%s} -font {{%s} -%d %s} -tags %s\n", glist_getcanvas(x), (int)glist_xtopixels(x, x->gl_ylabelx), (int)glist_ytopixels(x, atof(x->gl_ylabel[i]->s_name)), ! x->gl_ylabel[i]->s_name, sys_font, ! glist_getfont(x), sys_fontweight, tag);
/* draw contents of graph as glist */ *************** *** 991,1000 **** }
! static float graph_lastxpix, graph_lastypix;
static void graph_motion(void *z, t_floatarg dx, t_floatarg dy) { t_glist *x = (t_glist *)z; ! float newxpix = graph_lastxpix + dx, newypix = graph_lastypix + dy; t_garray *a = (t_garray *)(x->gl_list); int oldx = 0.5 + glist_pixelstox(x, graph_lastxpix); --- 992,1001 ---- }
! static t_float graph_lastxpix, graph_lastypix;
static void graph_motion(void *z, t_floatarg dx, t_floatarg dy) { t_glist *x = (t_glist *)z; ! t_float newxpix = graph_lastxpix + dx, newypix = graph_lastypix + dy; t_garray *a = (t_garray *)(x->gl_list); int oldx = 0.5 + glist_pixelstox(x, graph_lastxpix); *************** *** 1002,1007 **** t_word *vec; int nelem, i; ! float oldy = glist_pixelstoy(x, graph_lastypix); ! float newy = glist_pixelstoy(x, newypix); graph_lastxpix = newxpix; graph_lastypix = newypix; --- 1003,1008 ---- t_word *vec; int nelem, i; ! t_float oldy = glist_pixelstoy(x, graph_lastypix); ! t_float newy = glist_pixelstoy(x, newypix); graph_lastxpix = newxpix; graph_lastypix = newypix; *************** *** 1021,1025 **** for (i = oldx + 1; i <= newx; i++) vec[i].w_float = newy + (oldy - newy) * ! ((float)(newx - i))/(float)(newx - oldx); } else if (oldx > newx + 1) --- 1022,1026 ---- for (i = oldx + 1; i <= newx; i++) vec[i].w_float = newy + (oldy - newy) * ! ((t_float)(newx - i))/(t_float)(newx - oldx); } else if (oldx > newx + 1) *************** *** 1027,1031 **** for (i = oldx - 1; i >= newx; i--) vec[i].w_float = newy + (oldy - newy) * ! ((float)(newx - i))/(float)(newx - oldx); } else vec[newx].w_float = newy; --- 1028,1032 ---- for (i = oldx - 1; i >= newx; i--) vec[i].w_float = newy + (oldy - newy) * ! ((t_float)(newx - i))/(t_float)(newx - oldx); } else vec[newx].w_float = newy;
Index: d_filter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_filter.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** d_filter.c 29 Jul 2005 19:01:19 -0000 1.5 --- d_filter.c 28 Dec 2007 03:43:03 -0000 1.6 *************** *** 12,17 **** typedef struct hipctl { ! float c_x; ! float c_coef; } t_hipctl;
--- 12,17 ---- typedef struct hipctl { ! t_sample c_x; ! t_sample c_coef; } t_hipctl;
*************** *** 19,27 **** { t_object x_obj; ! float x_sr; ! float x_hz; t_hipctl x_cspace; t_hipctl *x_ctl; ! float x_f; } t_sighip;
--- 19,27 ---- { t_object x_obj; ! t_float x_sr; ! t_float x_hz; t_hipctl x_cspace; t_hipctl *x_ctl; ! t_float x_f; } t_sighip;
*************** *** 55,70 **** static t_int *sighip_perform(t_int *w) { ! float *in = (float *)(w[1]); ! float *out = (float *)(w[2]); t_hipctl *c = (t_hipctl *)(w[3]); int n = (t_int)(w[4]); int i; ! float last = c->c_x; ! float coef = c->c_coef; if (coef < 1) { for (i = 0; i < n; i++) { ! float new = *in++ + coef * last; *out++ = new - last; last = new; --- 55,70 ---- static t_int *sighip_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); t_hipctl *c = (t_hipctl *)(w[3]); int n = (t_int)(w[4]); int i; ! t_sample last = c->c_x; ! t_sample coef = c->c_coef; if (coef < 1) { for (i = 0; i < n; i++) { ! t_sample new = *in++ + coef * last; *out++ = new - last; last = new; *************** *** 113,118 **** typedef struct lopctl { ! float c_x; ! float c_coef; } t_lopctl;
--- 113,118 ---- typedef struct lopctl { ! t_sample c_x; ! t_sample c_coef; } t_lopctl;
*************** *** 120,128 **** { t_object x_obj; ! float x_sr; ! float x_hz; t_lopctl x_cspace; t_lopctl *x_ctl; ! float x_f; } t_siglop;
--- 120,128 ---- { t_object x_obj; ! t_float x_sr; ! t_float x_hz; t_lopctl x_cspace; t_lopctl *x_ctl; ! t_float x_f; } t_siglop;
*************** *** 162,173 **** static t_int *siglop_perform(t_int *w) { ! float *in = (float *)(w[1]); ! float *out = (float *)(w[2]); t_lopctl *c = (t_lopctl *)(w[3]); int n = (t_int)(w[4]); int i; ! float last = c->c_x; ! float coef = c->c_coef; ! float feedback = 1 - coef; for (i = 0; i < n; i++) last = *out++ = coef * *in++ + feedback * last; --- 162,173 ---- static t_int *siglop_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); t_lopctl *c = (t_lopctl *)(w[3]); int n = (t_int)(w[4]); int i; ! t_sample last = c->c_x; ! t_sample coef = c->c_coef; ! t_sample feedback = 1 - coef; for (i = 0; i < n; i++) last = *out++ = coef * *in++ + feedback * last; *************** *** 203,211 **** typedef struct bpctl { ! float c_x1; ! float c_x2; ! float c_coef1; ! float c_coef2; ! float c_gain; } t_bpctl;
--- 203,211 ---- typedef struct bpctl { ! t_sample c_x1; ! t_sample c_x2; ! t_sample c_coef1; ! t_sample c_coef2; ! t_sample c_gain; } t_bpctl;
*************** *** 213,222 **** { t_object x_obj; ! float x_sr; ! float x_freq; ! float x_q; t_bpctl x_cspace; t_bpctl *x_ctl; ! float x_f; } t_sigbp;
--- 213,222 ---- { t_object x_obj; ! t_float x_sr; ! t_float x_freq; ! t_float x_q; t_bpctl x_cspace; t_bpctl *x_ctl; ! t_float x_f; } t_sigbp;
*************** *** 240,248 **** }
! static float sigbp_qcos(float f) { if (f >= -(0.5f*3.14159f) && f <= 0.5f*3.14159f) { ! float g = f*f; return (((g*g*g * (-1.0f/720.0f) + g*g*(1.0f/24.0f)) - g*0.5) + 1); } --- 240,248 ---- }
! static t_float sigbp_qcos(t_float f) { if (f >= -(0.5f*3.14159f) && f <= 0.5f*3.14159f) { ! t_float g = f*f; return (((g*g*g * (-1.0f/720.0f) + g*g*(1.0f/24.0f)) - g*0.5) + 1); } *************** *** 252,256 **** static void sigbp_docoef(t_sigbp *x, t_floatarg f, t_floatarg q) { ! float r, oneminusr, omega; if (f < 0.001) f = 10; if (q < 0) q = 0; --- 252,256 ---- static void sigbp_docoef(t_sigbp *x, t_floatarg f, t_floatarg q) { ! t_float r, oneminusr, omega; if (f < 0.001) f = 10; if (q < 0) q = 0; *************** *** 286,302 **** static t_int *sigbp_perform(t_int *w) { ! float *in = (float *)(w[1]); ! float *out = (float *)(w[2]); t_bpctl *c = (t_bpctl *)(w[3]); int n = (t_int)(w[4]); int i; ! float last = c->c_x1; ! float prev = c->c_x2; ! float coef1 = c->c_coef1; ! float coef2 = c->c_coef2; ! float gain = c->c_gain; for (i = 0; i < n; i++) { ! float output = *in++ + coef1 * last + coef2 * prev; *out++ = gain * output; prev = last; --- 286,302 ---- static t_int *sigbp_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); t_bpctl *c = (t_bpctl *)(w[3]); int n = (t_int)(w[4]); int i; ! t_sample last = c->c_x1; ! t_sample prev = c->c_x2; ! t_sample coef1 = c->c_coef1; ! t_sample coef2 = c->c_coef2; ! t_sample gain = c->c_gain; for (i = 0; i < n; i++) { ! t_sample output = *in++ + coef1 * last + coef2 * prev; *out++ = gain * output; prev = last; *************** *** 339,349 **** typedef struct biquadctl { ! float c_x1; ! float c_x2; ! float c_fb1; ! float c_fb2; ! float c_ff1; ! float c_ff2; ! float c_ff3; } t_biquadctl;
--- 339,349 ---- typedef struct biquadctl { ! t_sample c_x1; ! t_sample c_x2; ! t_sample c_fb1; ! t_sample c_fb2; ! t_sample c_ff1; ! t_sample c_ff2; ! t_sample c_ff3; } t_biquadctl;
*************** *** 351,355 **** { t_object x_obj; ! float x_f; t_biquadctl x_cspace; t_biquadctl *x_ctl; --- 351,355 ---- { t_object x_obj; ! t_float x_f; t_biquadctl x_cspace; t_biquadctl *x_ctl; *************** *** 373,391 **** static t_int *sigbiquad_perform(t_int *w) { ! float *in = (float *)(w[1]); ! float *out = (float *)(w[2]); t_biquadctl *c = (t_biquadctl *)(w[3]); int n = (t_int)(w[4]); int i; ! float last = c->c_x1; ! float prev = c->c_x2; ! float fb1 = c->c_fb1; ! float fb2 = c->c_fb2; ! float ff1 = c->c_ff1; ! float ff2 = c->c_ff2; ! float ff3 = c->c_ff3; for (i = 0; i < n; i++) { ! float output = *in++ + fb1 * last + fb2 * prev; if (PD_BIGORSMALL(output)) output = 0; --- 373,391 ---- static t_int *sigbiquad_perform(t_int *w) { ! t_sample *in = (t_sample *)(w[1]); ! t_sample *out = (t_sample *)(w[2]); t_biquadctl *c = (t_biquadctl *)(w[3]); int n = (t_int)(w[4]); int i; ! t_sample last = c->c_x1; ! t_sample prev = c->c_x2; ! t_sample fb1 = c->c_fb1; ! t_sample fb2 = c->c_fb2; ! t_sample ff1 = c->c_ff1; ! t_sample ff2 = c->c_ff2; ! t_sample ff3 = c->c_ff3; for (i = 0; i < n; i++) { ! t_sample output = *in++ + fb1 * last + fb2 * prev; if (PD_BIGORSMALL(output)) output = 0; *************** *** 401,410 **** static void sigbiquad_list(t_sigbiquad *x, t_symbol *s, int argc, t_atom *argv) { ! float fb1 = atom_getfloatarg(0, argc, argv); ! float fb2 = atom_getfloatarg(1, argc, argv); ! float ff1 = atom_getfloatarg(2, argc, argv); ! float ff2 = atom_getfloatarg(3, argc, argv); ! float ff3 = atom_getfloatarg(4, argc, argv); ! float discriminant = fb1 * fb1 + 4 * fb2; t_biquadctl *c = x->x_ctl; if (discriminant < 0) /* imaginary roots -- resonant filter */ --- 401,410 ---- static void sigbiquad_list(t_sigbiquad *x, t_symbol *s, int argc, t_atom *argv) { ! t_float fb1 = atom_getfloatarg(0, argc, argv); ! t_float fb2 = atom_getfloatarg(1, argc, argv); ! t_float ff1 = atom_getfloatarg(2, argc, argv); ! t_float ff2 = atom_getfloatarg(3, argc, argv); ! t_float ff3 = atom_getfloatarg(4, argc, argv); ! t_float discriminant = fb1 * fb1 + 4 * fb2; t_biquadctl *c = x->x_ctl; if (discriminant < 0) /* imaginary roots -- resonant filter */ *************** *** 466,472 **** { t_object x_obj; ! float x_f; ! float x_lastin; ! float x_lastout; } t_sigsamphold;
--- 466,472 ---- { t_object x_obj; ! t_float x_f; ! t_sample x_lastin; ! t_sample x_lastout; } t_sigsamphold;
*************** *** 486,500 **** static t_int *sigsamphold_perform(t_int *w) { ! float *in1 = (float *)(w[1]); ! float *in2 = (float *)(w[2]); ! float *out = (float *)(w[3]); t_sigsamphold *x = (t_sigsamphold *)(w[4]); int n = (t_int)(w[5]); int i; ! float lastin = x->x_lastin; ! float lastout = x->x_lastout; for (i = 0; i < n; i++, *in1++) { ! float next = *in2++; if (next < lastin) lastout = *in1; *out++ = lastout; --- 486,500 ---- static t_int *sigsamphold_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); t_sigsamphold *x = (t_sigsamphold *)(w[4]); int n = (t_int)(w[5]); int i; ! t_sample lastin = x->x_lastin; ! t_sample lastout = x->x_lastout; for (i = 0; i < n; i++, *in1++) { ! t_sample next = *in2++; if (next < lastin) lastout = *in1; *out++ = lastout; *************** *** 543,548 **** { t_object x_obj; ! float x_f; ! float x_last; } t_sigrpole;
--- 543,548 ---- { t_object x_obj; ! t_float x_f; ! t_sample x_last; } t_sigrpole;
*************** *** 562,576 **** static t_int *sigrpole_perform(t_int *w) { ! float *in1 = (float *)(w[1]); ! float *in2 = (float *)(w[2]); ! float *out = (float *)(w[3]); t_sigrpole *x = (t_sigrpole *)(w[4]); int n = (t_int)(w[5]); int i; ! float last = x->x_last; for (i = 0; i < n; i++) { ! float next = *in1++; ! float coef = *in2++; *out++ = last = coef * last + next; } --- 562,576 ---- static t_int *sigrpole_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); t_sigrpole *x = (t_sigrpole *)(w[4]); int n = (t_int)(w[5]); int i; ! t_sample last = x->x_last; for (i = 0; i < n; i++) { ! t_sample next = *in1++; ! t_sample coef = *in2++; *out++ = last = coef * last + next; } *************** *** 616,621 **** { t_object x_obj; ! float x_f; ! float x_last; } t_sigrzero;
--- 616,621 ---- { t_object x_obj; ! t_float x_f; ! t_sample x_last; } t_sigrzero;
*************** *** 635,649 **** static t_int *sigrzero_perform(t_int *w) { ! float *in1 = (float *)(w[1]); ! float *in2 = (float *)(w[2]); ! float *out = (float *)(w[3]); t_sigrzero *x = (t_sigrzero *)(w[4]); int n = (t_int)(w[5]); int i; ! float last = x->x_last; for (i = 0; i < n; i++) { ! float next = *in1++; ! float coef = *in2++; *out++ = next - coef * last; last = next; --- 635,649 ---- static t_int *sigrzero_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); t_sigrzero *x = (t_sigrzero *)(w[4]); int n = (t_int)(w[5]); int i; ! t_sample last = x->x_last; for (i = 0; i < n; i++) { ! t_sample next = *in1++; ! t_sample coef = *in2++; *out++ = next - coef * last; last = next; *************** *** 688,693 **** { t_object x_obj; ! float x_f; ! float x_last; } t_sigrzero_rev;
--- 688,693 ---- { t_object x_obj; ! t_float x_f; ! t_sample x_last; } t_sigrzero_rev;
*************** *** 707,721 **** static t_int *sigrzero_rev_perform(t_int *w) { ! float *in1 = (float *)(w[1]); ! float *in2 = (float *)(w[2]); ! float *out = (float *)(w[3]); t_sigrzero_rev *x = (t_sigrzero_rev *)(w[4]); int n = (t_int)(w[5]); int i; ! float last = x->x_last; for (i = 0; i < n; i++) { ! float next = *in1++; ! float coef = *in2++; *out++ = last - coef * next; last = next; --- 707,721 ---- static t_int *sigrzero_rev_perform(t_int *w) { ! t_sample *in1 = (t_sample *)(w[1]); ! t_sample *in2 = (t_sample *)(w[2]); ! t_sample *out = (t_sample *)(w[3]); t_sigrzero_rev *x = (t_sigrzero_rev *)(w[4]); int n = (t_int)(w[5]); int i; ! t_sample last = x->x_last; for (i = 0; i < n; i++) { ! t_sample next = *in1++; ! t_sample coef = *in2++; *out++ = last - coef * next; last = next; *************** *** 761,767 **** { t_object x_obj; ! float x_f; ! float x_lastre; ! float x_lastim; } t_sigcpole;
--- 761,767 ---- { t_object x_obj; ! t_float x_f; ! t_sample x_lastre; ! t_sample x_lastim; } t_sigcpole;
*************** *** 787,808 **** static t_int *sigcpole_perform(t_int *w) { ! float *inre1 = (float *)(w[1]); ! float *inim1 = (float *)(w[2]); ! float *inre2 = (float *)(w[3]); ! float *inim2 = (float *)(w[4]); ! float *outre = (float *)(w[5]); ! float *outim = (float *)(w[6]); t_sigcpole *x = (t_sigcpole *)(w[7]); int n = (t_int)(w[8]); int i; ! float lastre = x->x_lastre; ! float lastim = x->x_lastim; for (i = 0; i < n; i++) { ! float nextre = *inre1++; ! float nextim = *inim1++; ! float coefre = *inre2++; ! float coefim = *inim2++; ! float tempre = *outre++ = nextre + lastre * coefre - lastim * coefim; lastim = *outim++ = nextim + lastre * coefim + lastim * coefre; lastre = tempre; --- 787,808 ---- static t_int *sigcpole_perform(t_int *w) { ! t_sample *inre1 = (t_sample *)(w[1]); ! t_sample *inim1 = (t_sample *)(w[2]); ! t_sample *inre2 = (t_sample *)(w[3]); ! t_sample *inim2 = (t_sample *)(w[4]); ! t_sample *outre = (t_sample *)(w[5]); ! t_sample *outim = (t_sample *)(w[6]); t_sigcpole *x = (t_sigcpole *)(w[7]); int n = (t_int)(w[8]); int i; ! t_sample lastre = x->x_lastre; ! t_sample lastim = x->x_lastim; for (i = 0; i < n; i++) { ! t_sample nextre = *inre1++; ! t_sample nextim = *inim1++; ! t_sample coefre = *inre2++; ! t_sample coefim = *inim2++; ! t_sample tempre = *outre++ = nextre + lastre * coefre - lastim * coefim; lastim = *outim++ = nextim + lastre * coefim + lastim * coefre; lastre = tempre; *************** *** 854,860 **** { t_object x_obj; ! float x_f; ! float x_lastre; ! float x_lastim; } t_sigczero;
--- 854,860 ---- { t_object x_obj; ! t_float x_f; ! t_sample x_lastre; ! t_sample x_lastim; } t_sigczero;
*************** *** 880,900 **** static t_int *sigczero_perform(t_int *w) { ! float *inre1 = (float *)(w[1]); ! float *inim1 = (float *)(w[2]); ! float *inre2 = (float *)(w[3]); ! float *inim2 = (float *)(w[4]); ! float *outre = (float *)(w[5]); ! float *outim = (float *)(w[6]); t_sigczero *x = (t_sigczero *)(w[7]); int n = (t_int)(w[8]); int i; ! float lastre = x->x_lastre; ! float lastim = x->x_lastim; for (i = 0; i < n; i++) { ! float nextre = *inre1++; ! float nextim = *inim1++; ! float coefre = *inre2++; ! float coefim = *inim2++; *outre++ = nextre - lastre * coefre + lastim * coefim; *outim++ = nextim - lastre * coefim - lastim * coefre; --- 880,900 ---- static t_int *sigczero_perform(t_int *w) { ! t_sample *inre1 = (t_sample *)(w[1]); ! t_sample *inim1 = (t_sample *)(w[2]); ! t_sample *inre2 = (t_sample *)(w[3]); ! t_sample *inim2 = (t_sample *)(w[4]); ! t_sample *outre = (t_sample *)(w[5]); ! t_sample *outim = (t_sample *)(w[6]); t_sigczero *x = (t_sigczero *)(w[7]); int n = (t_int)(w[8]); int i; ! t_sample lastre = x->x_lastre; ! t_sample lastim = x->x_lastim; for (i = 0; i < n; i++) { ! t_sample nextre = *inre1++; ! t_sample nextim = *inim1++; ! t_sample coefre = *inre2++; ! t_sample coefim = *inim2++; *outre++ = nextre - lastre * coefre + lastim * coefim; *outim++ = nextim - lastre * coefim - lastim * coefre; *************** *** 944,950 **** { t_object x_obj; ! float x_f; ! float x_lastre; ! float x_lastim; } t_sigczero_rev;
--- 944,950 ---- { t_object x_obj; ! t_float x_f; ! t_sample x_lastre; ! t_sample x_lastim; } t_sigczero_rev;
*************** *** 970,990 **** static t_int *sigczero_rev_perform(t_int *w) { ! float *inre1 = (float *)(w[1]); ! float *inim1 = (float *)(w[2]); ! float *inre2 = (float *)(w[3]); ! float *inim2 = (float *)(w[4]); ! float *outre = (float *)(w[5]); ! float *outim = (float *)(w[6]); t_sigczero_rev *x = (t_sigczero_rev *)(w[7]); int n = (t_int)(w[8]); int i; ! float lastre = x->x_lastre; ! float lastim = x->x_lastim; for (i = 0; i < n; i++) { ! float nextre = *inre1++; ! float nextim = *inim1++; ! float coefre = *inre2++; ! float coefim = *inim2++; /* transfer function is (A bar) - Z^-1, for the same frequency response as 1 - AZ^-1 from czero_tilde. */ --- 970,990 ---- static t_int *sigczero_rev_perform(t_int *w) { ! t_sample *inre1 = (t_sample *)(w[1]); ! t_sample *inim1 = (t_sample *)(w[2]); ! t_sample *inre2 = (t_sample *)(w[3]); ! t_sample *inim2 = (t_sample *)(w[4]); ! t_sample *outre = (t_sample *)(w[5]); ! t_sample *outim = (t_sample *)(w[6]); t_sigczero_rev *x = (t_sigczero_rev *)(w[7]); int n = (t_int)(w[8]); int i; ! t_sample lastre = x->x_lastre; ! t_sample lastim = x->x_lastim; for (i = 0; i < n; i++) { ! t_sample nextre = *inre1++; ! t_sample nextim = *inim1++; ! t_sample coefre = *inre2++; ! t_sample coefim = *inim2++; /* transfer function is (A bar) - Z^-1, for the same frequency response as 1 - AZ^-1 from czero_tilde. */
Index: g_mycanvas.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_mycanvas.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** g_mycanvas.c 6 Sep 2004 20:20:34 -0000 1.5 --- g_mycanvas.c 28 Dec 2007 03:43:04 -0000 1.6 *************** *** 45,52 **** x->x_gui.x_bcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); }
--- 45,53 ---- x->x_gui.x_bcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, ! x->x_gui.x_lcol, x); }
*************** *** 85,90 **** sys_vgui(".x%lx.c itemconfigure %lxBASE -outline #%6.6x\n", canvas, x, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_bcol); ! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); } --- 86,92 ---- sys_vgui(".x%lx.c itemconfigure %lxBASE -outline #%6.6x\n", canvas, x, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_bcol); ! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, ! x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); } *************** *** 153,157 ****
iemgui_properties(&x->x_gui, srl); ! sprintf(buf, "pdtk_iemgui_dialog %%s MY_CANVAS \ ------selectable_dimensions(pix):------ %d %d size: 0.0 0.0 empty \ ------visible_rectangle(pix)(pix):------ %d width: %d height: %d \ --- 155,159 ----
iemgui_properties(&x->x_gui, srl); ! sprintf(buf, "pdtk_iemgui_dialog %%s |cnv| \ ------selectable_dimensions(pix):------ %d %d size: 0.0 0.0 empty \ ------visible_rectangle(pix)(pix):------ %d width: %d height: %d \ *************** *** 332,336 **** else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, "courier"); } if (x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv); --- 334,338 ---- else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, sys_font); } if (x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
Index: g_editor.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** g_editor.c 9 Oct 2006 04:36:12 -0000 1.20 --- g_editor.c 28 Dec 2007 03:43:04 -0000 1.21 *************** *** 382,386 ****
void canvas_disconnect(t_canvas *x, ! float index1, float outno, float index2, float inno) { t_linetraverser t; --- 382,386 ----
void canvas_disconnect(t_canvas *x, ! t_float index1, t_float outno, t_float index2, t_float inno) { t_linetraverser t; *************** *** 794,797 **** --- 794,808 ---- *x1p = x1, *y1p = y1, *x2p = x2, *y2p = y2, rval = y; } + /* if there are at least two selected objects, we'd prefer + to find a selected one (never mind which) to the one we got. */ + if (x->gl_editor && x->gl_editor->e_selection && + x->gl_editor->e_selection->sel_next && !glist_isselected(x, y)) + { + t_selection *sel; + for (sel = x->gl_editor->e_selection; sel; sel = sel->sel_next) + if (canvas_hitbox(x, sel->sel_what, xpos, ypos, &x1, &y1, &x2, &y2)) + *x1p = x1, *y1p = y1, *x2p = x2, *y2p = y2, + rval = sel->sel_what; + } return (rval); } *************** *** 894,898 ****
! float xperpix, yperpix, x1, y1, x2, y2, xpix, ypix, xmargin, ymargin; int graphme, redraw = 0;
--- 905,909 ----
! t_float xperpix, yperpix, x1, y1, x2, y2, xpix, ypix, xmargin, ymargin; int graphme, redraw = 0;
*************** *** 967,971 **** /* called from the gui when a popup menu comes back with "properties," "open," or "help." */ ! static void canvas_done_popup(t_canvas *x, float which, float xpos, float ypos) { char pathbuf[MAXPDSTRING], namebuf[MAXPDSTRING]; --- 978,982 ---- /* called from the gui when a popup menu comes back with "properties," "open," or "help." */ ! static void canvas_done_popup(t_canvas *x, t_float which, t_float xpos, t_float ypos) { char pathbuf[MAXPDSTRING], namebuf[MAXPDSTRING]; *************** *** 1202,1215 **** t_linetraverser t; t_outconnect *oc; ! float fx = xpos, fy = ypos; t_glist *glist2 = glist_getcanvas(x); linetraverser_start(&t, glist2); while (oc = linetraverser_next(&t)) { ! float lx1 = t.tr_lx1, ly1 = t.tr_ly1, lx2 = t.tr_lx2, ly2 = t.tr_ly2; ! float area = (lx2 - lx1) * (fy - ly1) - (ly2 - ly1) * (fx - lx1); ! float dsquare = (lx2-lx1) * (lx2-lx1) + (ly2-ly1) * (ly2-ly1); if (area * area >= 50 * dsquare) continue; if ((lx2-lx1) * (fx-lx1) + (ly2-ly1) * (fy-ly1) < 0) continue; --- 1213,1226 ---- t_linetraverser t; t_outconnect *oc; ! t_float fx = xpos, fy = ypos; t_glist *glist2 = glist_getcanvas(x); linetraverser_start(&t, glist2); while (oc = linetraverser_next(&t)) { ! t_float lx1 = t.tr_lx1, ly1 = t.tr_ly1, lx2 = t.tr_lx2, ly2 = t.tr_ly2; ! t_float area = (lx2 - lx1) * (fy - ly1) - (ly2 - ly1) * (fx - lx1); ! t_float dsquare = (lx2-lx1) * (lx2-lx1) + (ly2-ly1) * (ly2-ly1); if (area * area >= 50 * dsquare) continue; if ((lx2-lx1) * (fx-lx1) + (ly2-ly1) * (fy-ly1) < 0) continue; *************** *** 1494,1500 **** #endif if (keynumsym->s_thing && down) ! pd_float(keynumsym->s_thing, (float)keynum); if (keyupsym->s_thing && !down) ! pd_float(keyupsym->s_thing, (float)keynum); if (keynamesym->s_thing) { --- 1505,1511 ---- #endif if (keynumsym->s_thing && down) ! pd_float(keynumsym->s_thing, (t_float)keynum); if (keyupsym->s_thing && !down) ! pd_float(keyupsym->s_thing, (t_float)keynum); if (keynamesym->s_thing) { *************** *** 1513,1517 **** && x->gl_editor->e_keyfn && keynum) (* x->gl_editor->e_keyfn) ! (x->gl_editor->e_grab, (float)keynum); /* if a text editor is open send the key on, as long as it is either "real" (has a key number) or else is an arrow key. */ --- 1524,1528 ---- && x->gl_editor->e_keyfn && keynum) (* x->gl_editor->e_keyfn) ! (x->gl_editor->e_grab, (t_float)keynum); /* if a text editor is open send the key on, as long as it is either "real" (has a key number) or else is an arrow key. */ *************** *** 2383,2387 **** t_floatarg whichresize) { ! float realresize, realresx = 1, realresy = 1; t_canvas *x2 = canvas_getrootfor(x); if (!resize) realresize = 1; --- 2394,2398 ---- t_floatarg whichresize) { ! t_float realresize, realresx = 1, realresy = 1; t_canvas *x2 = canvas_getrootfor(x); if (!resize) realresize = 1;
Index: d_ugen.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_ugen.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** d_ugen.c 24 Aug 2006 15:23:51 -0000 1.9 --- d_ugen.c 28 Dec 2007 03:43:03 -0000 1.10 *************** *** 19,23 ****
extern t_class *vinlet_class, *voutlet_class, *canvas_class; ! t_sample *obj_findsignalscalar(t_object *x, int m); static int ugen_loud; static t_int *dsp_chain; --- 19,23 ----
extern t_class *vinlet_class, *voutlet_class, *canvas_class; ! t_float *obj_findsignalscalar(t_object *x, int m); static int ugen_loud; static t_int *dsp_chain; *************** *** 39,43 **** t_int *zero_perform(t_int *w) /* zero out a vector */ { ! t_float *out = (t_float *)(w[1]); int n = (int)(w[2]); while (n--) *out++ = 0; --- 39,43 ---- t_int *zero_perform(t_int *w) /* zero out a vector */ { ! t_sample *out = (t_sample *)(w[1]); int n = (int)(w[2]); while (n--) *out++ = 0; *************** *** 47,51 **** t_int *zero_perf8(t_int *w) { ! t_float *out = (t_float *)(w[1]); int n = (int)(w[2]);
--- 47,51 ---- t_int *zero_perf8(t_int *w) { ! t_sample *out = (t_sample *)(w[1]); int n = (int)(w[2]);
*************** *** 428,432 **** signal_setborrowed(). */
! t_signal *signal_new(int n, float sr) { int logn, n2, vecsize = 0; --- 428,432 ---- signal_setborrowed(). */
! t_signal *signal_new(int n, t_float sr) { int logn, n2, vecsize = 0; *************** *** 540,544 **** int dc_noutlets; t_signal **dc_iosigs; ! float dc_srate; int dc_vecsize; /* vector size, power of two */ int dc_calcsize; /* number of elements to calculate */ --- 540,544 ---- int dc_noutlets; t_signal **dc_iosigs; ! t_float dc_srate; int dc_vecsize; /* vector size, power of two */ int dc_calcsize; /* number of elements to calculate */ *************** *** 613,617 **** { t_dspcontext *dc = (t_dspcontext *)getbytes(sizeof(*dc)); ! float parent_srate, srate; int parent_vecsize, vecsize;
--- 613,617 ---- { t_dspcontext *dc = (t_dspcontext *)getbytes(sizeof(*dc)); ! t_float parent_srate, srate; int parent_vecsize, vecsize;
*************** *** 733,737 **** if (!uin->i_nconnect) { ! t_sample *scalar; s3 = signal_new(dc->dc_vecsize, dc->dc_srate); /* post("%s: unconnected signal inlet set to zero", --- 733,737 ---- if (!uin->i_nconnect) { ! t_float *scalar; s3 = signal_new(dc->dc_vecsize, dc->dc_srate); /* post("%s: unconnected signal inlet set to zero", *************** *** 868,875 **** t_block *blk; t_dspcontext *parent_context = dc->dc_parentcontext; ! float parent_srate; int parent_vecsize; int period, frequency, phase, vecsize, calcsize; ! float srate; int chainblockbegin; /* DSP chain onset before block prolog code */ int chainblockend; /* and after block epilog code */ --- 868,875 ---- t_block *blk; t_dspcontext *parent_context = dc->dc_parentcontext; ! t_float parent_srate; int parent_vecsize; int period, frequency, phase, vecsize, calcsize; ! t_float srate; int chainblockbegin; /* DSP chain onset before block prolog code */ int chainblockend; /* and after block epilog code */ *************** *** 1154,1158 **** { t_object x_obj; ! float x_sr; t_canvas *x_canvas; } t_samplerate; --- 1154,1158 ---- { t_object x_obj; ! t_float x_sr; t_canvas *x_canvas; } t_samplerate; *************** *** 1162,1166 **** static void samplerate_tilde_bang(t_samplerate *x) { ! float srate = sys_getsr(); t_canvas *canvas = x->x_canvas; while (canvas) --- 1162,1166 ---- static void samplerate_tilde_bang(t_samplerate *x) { ! t_float srate = sys_getsr(); t_canvas *canvas = x->x_canvas; while (canvas) *************** *** 1168,1172 **** t_block *b = (t_block *)canvas_getblock(block_class, &canvas); if (b) ! srate *= (float)(b->x_upsample) / (float)(b->x_downsample); } outlet_float(x->x_obj.ob_outlet, srate); --- 1168,1172 ---- t_block *b = (t_block *)canvas_getblock(block_class, &canvas); if (b) ! srate *= (t_float)(b->x_upsample) / (t_float)(b->x_downsample); } outlet_float(x->x_obj.ob_outlet, srate);
Index: x_connective.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_connective.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** x_connective.c 24 Aug 2006 15:23:52 -0000 1.9 --- x_connective.c 28 Dec 2007 03:43:06 -0000 1.10 *************** *** 507,511 **** if (x->x_type == A_FLOAT) { ! float f; if (!argc) return; f = atom_getfloat(argv); --- 507,511 ---- if (x->x_type == A_FLOAT) { ! t_float f; if (!argc) return; f = atom_getfloat(argv); *************** *** 1058,1062 **** { t_object x_obj; ! float x_state; } t_spigot;
--- 1058,1062 ---- { t_object x_obj; ! t_float x_state; } t_spigot;
*************** *** 1119,1123 **** t_object x_ob; t_outlet *x_out2; ! float x_y; } t_moses;
--- 1119,1123 ---- t_object x_ob; t_outlet *x_out2; ! t_float x_y; } t_moses;
*************** *** 1175,1178 **** --- 1175,1180 ---- static void until_float(t_until *x, t_float f) { + if (f < 0) + f = 0; x->x_run = 1; x->x_count = f; *************** *** 1203,1214 **** t_object x_obj; t_symbol *x_format; } t_makefilename;
static void *makefilename_new(t_symbol *s) { t_makefilename *x = (t_makefilename *)pd_new(makefilename_class); ! if (!s->s_name) s = gensym("file.%d"); outlet_new(&x->x_obj, &s_symbol); x->x_format = s; return (x); } --- 1205,1255 ---- t_object x_obj; t_symbol *x_format; + t_atomtype x_accept; + int x_intconvert; } t_makefilename;
+ static void makefilename_scanformat(t_makefilename *x) + { + int num=0, infmt=0; + char *str,*chr; + if (!x->x_format) return; + x->x_accept = A_NULL; + for (str=x->x_format->s_name; *str; str++) { + if (!infmt && *str=='%') { + infmt=1; + continue; + } + if (infmt) { + if (strchr("-.#0123456789",*str)!=0) + continue; + if (*str=='s') { + x->x_accept = A_SYMBOL; + x->x_intconvert = 0; + break; + } + if (strchr("fgGeE",*str)!=0) { + x->x_accept = A_FLOAT; + x->x_intconvert = 0; + break; + } + if (strchr("xXdiou",*str)!=0) { + x->x_accept = A_FLOAT; + x->x_intconvert = 1; + break; + } + infmt=0; + } + } + } + static void *makefilename_new(t_symbol *s) { t_makefilename *x = (t_makefilename *)pd_new(makefilename_class); ! if (!s || !s->s_name) s = gensym("file.%d"); outlet_new(&x->x_obj, &s_symbol); x->x_format = s; + x->x_accept = A_NULL; + x->x_intconvert = 0; + makefilename_scanformat(x); return (x); } *************** *** 1217,1221 **** --- 1258,1270 ---- { char buf[MAXPDSTRING]; + if (x->x_accept == A_FLOAT) { + if (x->x_intconvert) sprintf(buf, x->x_format->s_name, (int)f); + else + sprintf(buf, x->x_format->s_name, f); + } + else + sprintf(buf, x->x_format->s_name, ""); + if (buf[0]!=0) outlet_symbol(x->x_obj.ob_outlet, gensym(buf)); } *************** *** 1224,1228 **** --- 1273,1281 ---- { char buf[MAXPDSTRING]; + if (x->x_accept == A_SYMBOL) sprintf(buf, x->x_format->s_name, s->s_name); + else + sprintf(buf, x->x_format->s_name, 0); + if (buf[0]!=0) outlet_symbol(x->x_obj.ob_outlet, gensym(buf)); } *************** *** 1231,1234 **** --- 1284,1288 ---- { x->x_format = s; + makefilename_scanformat(x); }
Index: g_bang.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_bang.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** g_bang.c 8 Sep 2006 23:45:30 -0000 1.5 --- g_bang.c 28 Dec 2007 03:43:03 -0000 1.6 *************** *** 56,64 **** x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", --- 56,65 ---- x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, ! x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", *************** *** 116,121 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); --- 117,122 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); *************** *** 238,242 ****
iemgui_properties(&x->x_gui, srl); ! sprintf(buf, "pdtk_iemgui_dialog %%s BANG \ ----------dimensions(pix):----------- %d %d size: 0 0 empty \ --------flash-time(ms)(ms):--------- %d intrrpt: %d hold: %d \ --- 239,243 ----
iemgui_properties(&x->x_gui, srl); ! sprintf(buf, "pdtk_iemgui_dialog %%s |bang| \ ----------dimensions(pix):----------- %d %d size: 0 0 empty \ --------flash-time(ms)(ms):--------- %d intrrpt: %d hold: %d \ *************** *** 482,486 **** else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, "courier"); }
if (x->x_gui.x_fsf.x_rcv_able) --- 483,487 ---- else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, sys_font); }
if (x->x_gui.x_fsf.x_rcv_able)
Index: g_numbox.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_numbox.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** g_numbox.c 8 Sep 2006 23:45:30 -0000 1.8 --- g_numbox.c 28 Dec 2007 03:43:04 -0000 1.9 *************** *** 196,208 **** x->x_gui.x_fcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); my_numbox_ftoa(x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %lxNUMBER\n", canvas, xpos+half+2, ypos+half+d, ! x->x_buf, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", --- 196,210 ---- x->x_gui.x_fcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", ! x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, ! x->x_gui.x_lcol, x); my_numbox_ftoa(x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ ! -font {{%s} -%d %s} -fill #%6.6x -tags %lxNUMBER\n", canvas, xpos+half+2, ypos+half+d, ! x->x_buf, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, ! x->x_gui.x_fcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", *************** *** 270,279 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); ! sys_vgui(".x%lx.c itemconfigure %lxNUMBER -font {%s %d bold} -fill #%6.6x \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_fcol); sys_vgui(".x%lx.c itemconfigure %lxBASE1 -fill #%6.6x\n", canvas, --- 272,281 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} -fill #%6.6x -text {%s} \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); ! sys_vgui(".x%lx.c itemconfigure %lxNUMBER -font {{%s} -%d %s} -fill #%6.6x \n", ! canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_fcol); sys_vgui(".x%lx.c itemconfigure %lxBASE1 -fill #%6.6x\n", canvas, *************** *** 390,394 **** (int)x->x_gui.x_obj.te_xpix, (int)x->x_gui.x_obj.te_ypix, gensym("nbx"), x->x_gui.x_w, x->x_gui.x_h, ! (float)x->x_min, (float)x->x_max, x->x_lin0_log1, iem_symargstoint(&x->x_gui.x_isa), srl[0], srl[1], srl[2], --- 392,396 ---- (int)x->x_gui.x_obj.te_xpix, (int)x->x_gui.x_obj.te_ypix, gensym("nbx"), x->x_gui.x_w, x->x_gui.x_h, ! (t_float)x->x_min, (t_float)x->x_max, x->x_lin0_log1, iem_symargstoint(&x->x_gui.x_isa), srl[0], srl[1], srl[2], *************** *** 452,456 ****
} ! sprintf(buf, "pdtk_iemgui_dialog %%s NUMBERBOX \ -------dimensions(digits)(pix):------- %d %d width: %d %d height: \ -----------output-range:----------- %g min: %g max: %d \ --- 454,458 ----
} ! sprintf(buf, "pdtk_iemgui_dialog %%s |nbx| \ -------dimensions(digits)(pix):------- %d %d width: %d %d height: \ -----------output-range:----------- %g min: %g max: %d \ *************** *** 807,811 **** else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, "courier"); } if (x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv); --- 809,813 ---- else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; ! strcpy(x->x_gui.x_font, sys_font); } if (x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
Index: s_audio_pa.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_pa.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** s_audio_pa.c 18 Aug 2007 23:32:44 -0000 1.7 --- s_audio_pa.c 28 Dec 2007 03:43:05 -0000 1.8 *************** *** 29,32 **** --- 29,34 ---- #define MAX_SAMPLES_PER_FRAME MAX_PA_CHANS * DEFDACBLKSIZE
+ int pa_foo; + static int pa_lowlevel_callback(const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, *************** *** 37,44 **** unsigned int j; float *fbuf, *fp2, *fp3, *soundiop; ! if (framesPerBuffer != DEFDACBLKSIZE) ! { ! fprintf(stderr, "ignoring buffer size %d\n", framesPerBuffer); ! return; } if (inputBuffer != NULL) --- 39,48 ---- unsigned int j; float *fbuf, *fp2, *fp3, *soundiop; ! if (pa_foo) ! fprintf(stderr, "pa_lowlevel_callback\n"); ! if (framesPerBuffer != DEFDACBLKSIZE) ! { ! fprintf(stderr, "ignoring buffer size %d\n", (int)framesPerBuffer); ! return 0; } if (inputBuffer != NULL) *************** *** 52,55 **** --- 56,61 ---- else memset((void *)pa_soundin, 0, framesPerBuffer * pa_inchans * sizeof(float)); + memset((void *)pa_soundout, 0, + framesPerBuffer * pa_outchans * sizeof(float)); (*pa_callback)(); if (outputBuffer != NULL) *************** *** 61,65 **** *fp3 = *soundiop++; } ! return 0; } --- 67,72 ---- *fp3 = *soundiop++; } ! if (pa_foo) ! fprintf(stderr, "done pa_lowlevel_callback\n"); return 0; } *************** *** 154,159 ****
pa_callback = callbackfn; ! if (callbackfn) ! fprintf(stderr, "callback enabled\n"); if (!initialized) { --- 161,165 ----
pa_callback = callbackfn; ! /* fprintf(stderr, "open callback %d\n", (callbackfn != 0)); */ if (!initialized) { *************** *** 255,258 **** --- 261,265 ---- void pa_close_audio( void) { + /* fprintf(stderr, "close\n"); */ if (pa_inchans || pa_outchans) CloseAudioStream( pa_stream );