Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31962
Modified Files:
Tag: devel_0_37
d_array.c d_ctl.c d_delay.c d_filter.c d_global.c d_osc.c
d_soundfile.c g_hdial.c g_template.c g_text.c g_vdial.c
m_binbuf.c m_class.c m_imp.h m_pd.h notes.txt s_main.c
u_main.tk x_misc.c x_time.c
Log Message:
importing miller's 0.37-2 to devel_0_37
Index: m_binbuf.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_binbuf.c,v
retrieving revision 1.1.1.4.2.5
retrieving revision 1.1.1.4.2.6
diff -C2 -d -r1.1.1.4.2.5 -r1.1.1.4.2.6
*** m_binbuf.c 24 Feb 2004 10:15:27 -0000 1.1.1.4.2.5
--- m_binbuf.c 23 Jul 2004 08:46:40 -0000 1.1.1.4.2.6
***************
*** 13,16 ****
--- 13,17 ----
#include <stdlib.h>
#include "m_pd.h"
+ #include "s_stuff.h"
#include <stdio.h>
#ifdef UNIX
***************
*** 862,866 ****
atom_getfloatarg(5, natom, nextmess) -
atom_getfloatarg(3, natom, nextmess),
! 12.);
}
}
--- 863,867 ----
atom_getfloatarg(5, natom, nextmess) -
atom_getfloatarg(3, natom, nextmess),
! (float)sys_defaultfont);
}
}
***************
*** 899,907 ****
nextmess[i].a_w.w_symbol = gensym("f");
}
SETSYMBOL(outmess, gensym("#X"));
SETSYMBOL(outmess + 1, gensym("obj"));
outmess[2] = nextmess[2];
outmess[3] = nextmess[3];
! for (i = 6; i < natom; i++)
outmess[i-2] = nextmess[i];
SETSEMI(outmess + natom - 2);
--- 900,911 ----
nextmess[i].a_w.w_symbol = gensym("f");
}
+ if (classname == gensym("table"))
+ classname = gensym("TABLE");
SETSYMBOL(outmess, gensym("#X"));
SETSYMBOL(outmess + 1, gensym("obj"));
outmess[2] = nextmess[2];
outmess[3] = nextmess[3];
! SETSYMBOL(outmess+4, classname);
! for (i = 7; i < natom; i++)
outmess[i-2] = nextmess[i];
SETSEMI(outmess + natom - 2);
Index: g_text.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_text.c,v
retrieving revision 1.1.1.4.2.3
retrieving revision 1.1.1.4.2.4
diff -C2 -d -r1.1.1.4.2.3 -r1.1.1.4.2.4
*** g_text.c 22 Feb 2004 17:36:50 -0000 1.1.1.4.2.3
--- g_text.c 23 Jul 2004 08:46:40 -0000 1.1.1.4.2.4
***************
*** 456,474 ****
#endif
static void gatom_set(t_gatom *x, t_symbol *s, int argc, t_atom *argv)
{
t_atom oldatom = x->a_atom;
! int update = 0;
if (!argc) return;
if (x->a_atom.a_type == A_FLOAT)
x->a_atom.a_w.w_float = atom_getfloat(argv),
! update = (x->a_atom.a_w.w_float != oldatom.a_w.w_float);
else if (x->a_atom.a_type == A_SYMBOL)
x->a_atom.a_w.w_symbol = atom_getsymbol(argv),
! update = (x->a_atom.a_w.w_symbol != oldatom.a_w.w_symbol);
! binbuf_clear(x->a_text.te_binbuf);
! binbuf_add(x->a_text.te_binbuf, 1, &x->a_atom);
! if (update)
! glist_retext(x->a_glist, &x->a_text);
x->a_buf[0] = 0;
}
--- 456,479 ----
#endif
+ static void gatom_retext(t_gatom *x, int senditup)
+ {
+ binbuf_clear(x->a_text.te_binbuf);
+ binbuf_add(x->a_text.te_binbuf, 1, &x->a_atom);
+ if (senditup)
+ glist_retext(x->a_glist, &x->a_text);
+ }
+
static void gatom_set(t_gatom *x, t_symbol *s, int argc, t_atom *argv)
{
t_atom oldatom = x->a_atom;
! int senditup = 0;
if (!argc) return;
if (x->a_atom.a_type == A_FLOAT)
x->a_atom.a_w.w_float = atom_getfloat(argv),
! senditup = (x->a_atom.a_w.w_float != oldatom.a_w.w_float);
else if (x->a_atom.a_type == A_SYMBOL)
x->a_atom.a_w.w_symbol = atom_getsymbol(argv),
! senditup = (x->a_atom.a_w.w_symbol != oldatom.a_w.w_symbol);
! gatom_retext(x, senditup);
x->a_buf[0] = 0;
}
***************
*** 568,576 ****
/* we're being notified that no more keys will come for this grab */
if (x->a_buf[0])
! {
! binbuf_clear(x->a_text.te_binbuf);
! binbuf_add(x->a_text.te_binbuf, 1, &x->a_atom);
! glist_retext(x->a_glist, &x->a_text);
! }
return;
}
--- 573,577 ----
/* we're being notified that no more keys will come for this grab */
if (x->a_buf[0])
! gatom_retext(x, 1);
return;
}
***************
*** 584,592 ****
else if (c == '\n')
{
! if (x->a_atom.a_type == A_FLOAT)
! gatom_float(x, atof(x->a_buf));
! else if (x->a_atom.a_type == A_SYMBOL)
! gatom_symbol(x, gensym(x->a_buf));
else bug("gatom_key");
}
else if (len < (ATOMBUFSIZE-1))
--- 585,596 ----
else if (c == '\n')
{
! if (x->a_atom.a_type == A_FLOAT)
! x->a_atom.a_w.w_float = atof(x->a_buf);
! else if (x->a_atom.a_type == A_SYMBOL)
! x->a_atom.a_w.w_symbol = gensym(x->a_buf);
else bug("gatom_key");
+ gatom_bang(x);
+ gatom_retext(x, 1);
+ x->a_buf[0] = 0;
}
else if (len < (ATOMBUFSIZE-1))
Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.1.1.4.2.11
retrieving revision 1.1.1.4.2.12
diff -C2 -d -r1.1.1.4.2.11 -r1.1.1.4.2.12
*** u_main.tk 22 Feb 2004 05:52:16 -0000 1.1.1.4.2.11
--- u_main.tk 23 Jul 2004 08:46:40 -0000 1.1.1.4.2.12
***************
*** 1958,1961 ****
--- 1958,1965 ----
if {[string index $hhhgui_nam 0] == "$"} {
set hhhgui_nam [string replace $hhhgui_nam 0 0 #] }
+
+ set hhhsnd [string map {" " _} $hhhsnd]
+ set hhhrcv [string map {" " _} $hhhrcv]
+ set hhhgui_nam [string map {" " _} $hhhgui_nam]
pd [concat $id dialog \
Index: m_imp.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_imp.h,v
retrieving revision 1.1.1.2.2.2
retrieving revision 1.1.1.2.2.3
diff -C2 -d -r1.1.1.2.2.2 -r1.1.1.2.2.3
*** m_imp.h 25 Nov 2003 19:19:57 -0000 1.1.1.2.2.2
--- m_imp.h 23 Jul 2004 08:46:40 -0000 1.1.1.2.2.3
***************
*** 10,13 ****
--- 10,14 ----
/* LATER consider whether to use 'char' for method arg types to save space */
+ #ifndef __m_imp_h_
/* the structure for a method handler ala Max */
***************
*** 78,79 ****
--- 79,83 ----
EXTERN void glob_evalfile(t_pd *ignore, t_symbol *name, t_symbol *dir);
EXTERN void glob_initfromgui(void *dummy, t_symbol *s, int argc, t_atom *argv);
+
+ #define __m_imp_h_
+ #endif /* __m_imp_h_ */
Index: m_class.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_class.c,v
retrieving revision 1.1.1.2.2.4
retrieving revision 1.1.1.2.2.5
diff -C2 -d -r1.1.1.2.2.4 -r1.1.1.2.2.5
*** m_class.c 22 Feb 2004 05:52:16 -0000 1.1.1.2.2.4
--- m_class.c 23 Jul 2004 08:46:40 -0000 1.1.1.2.2.5
***************
*** 509,513 ****
/* this routine is called when a new "object" is requested whose class Pd
! doesn't know. Pd tries to load it as an extern, then as an absteaction. */
void new_anything(void *dummy, t_symbol *s, int argc, t_atom *argv)
{
--- 509,513 ----
/* this routine is called when a new "object" is requested whose class Pd
! doesn't know. Pd tries to load it as an extern, then as an abstraction. */
void new_anything(void *dummy, t_symbol *s, int argc, t_atom *argv)
{
***************
*** 529,533 ****
current = s__X.s_thing;
if ((fd = open_via_path(dir->s_name, s->s_name, ".pd",
! dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0)
{
close (fd);
--- 529,535 ----
current = s__X.s_thing;
if ((fd = open_via_path(dir->s_name, s->s_name, ".pd",
! dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0 ||
! (fd = open_via_path(dir->s_name, s->s_name, ".pat",
! dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0)
{
close (fd);
Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
retrieving revision 1.1.1.4.2.13
retrieving revision 1.1.1.4.2.14
diff -C2 -d -r1.1.1.4.2.13 -r1.1.1.4.2.14
*** s_main.c 10 May 2004 18:19:12 -0000 1.1.1.4.2.13
--- s_main.c 23 Jul 2004 08:46:40 -0000 1.1.1.4.2.14
***************
*** 8,12 ****
*/
! char pd_version[] = "Pd version 0.37.1 devel\n";
char pd_compiletime[] = __TIME__;
char pd_compiledate[] = __DATE__;
--- 8,12 ----
*/
! char pd_version[] = "Pd version 0.37.2 devel\n";
char pd_compiletime[] = __TIME__;
char pd_compiledate[] = __DATE__;
***************
*** 51,54 ****
--- 51,55 ----
int m_scheduler(void);
void sys_addhelppath(char *p);
+ void sys_start_sfthread(void);
int sys_debuglevel;
***************
*** 282,288 ****
return(1);
- #ifdef THREADED_SF
- sys_start_sfthread();
- #endif /* THREDED_SF */
--- 283,286 ----
***************
*** 294,305 ****
sys_main_srate, sys_main_advance, 1);
/* run scheduler until it quits */
ret = m_scheduler();
! /* T.Grill - if soft quitting via sys_exit is used we can get here.... */
! sys_close_audio();
! sys_close_midi();
! return ret;
}
--- 292,307 ----
sys_main_srate, sys_main_advance, 1);
+ #ifdef THREADED_SF
+ sys_start_sfthread();
+ #endif /* THREDED_SF */
+
/* run scheduler until it quits */
ret = m_scheduler();
! /* T.Grill - if soft quitting via sys_exit is used we can get here.... */
! sys_close_audio();
! sys_close_midi();
! return ret;
}
***************
*** 616,620 ****
devno = 2 + 2 * atoi(argv[1]+7);
else goto usage;
- post("devno %d", devno);
sys_nsoundin = sys_nsoundout = 1;
sys_soundindevlist[0] = sys_soundoutdevlist[0] = devno;
--- 618,621 ----
Index: d_global.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_global.c,v
retrieving revision 1.1.1.2.8.2
retrieving revision 1.1.1.2.8.3
diff -C2 -d -r1.1.1.2.8.2 -r1.1.1.2.8.3
*** d_global.c 24 Nov 2003 16:27:49 -0000 1.1.1.2.8.2
--- d_global.c 23 Jul 2004 08:46:40 -0000 1.1.1.2.8.3
***************
*** 41,45 ****
while (n--)
{
! *out = (PD_BADFLOAT(*in) ? 0 : *in);
out++;
in++;
--- 41,45 ----
while (n--)
{
! *out = (PD_BIGORSMALL(*in) ? 0 : *in);
out++;
in++;
***************
*** 243,247 ****
while (n--)
{
! *out += (PD_BADFLOAT(*in) ? 0 : *in);
out++;
in++;
--- 243,247 ----
while (n--)
{
! *out += (PD_BIGORSMALL(*in) ? 0 : *in);
out++;
in++;
Index: d_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_array.c,v
retrieving revision 1.1.1.3.2.1
retrieving revision 1.1.1.3.2.2
diff -C2 -d -r1.1.1.3.2.1 -r1.1.1.3.2.2
*** d_array.c 12 Sep 2003 20:56:06 -0000 1.1.1.3.2.1
--- d_array.c 23 Jul 2004 08:46:40 -0000 1.1.1.3.2.2
***************
*** 53,57 ****
{
float f = *in++;
! if (PD_BADFLOAT(f))
f = 0;
*fp++ = f;
--- 53,57 ----
{
float f = *in++;
! if (PD_BIGORSMALL(f))
f = 0;
*fp++ = f;
***************
*** 735,739 ****
{
float f = *in++;
! if (PD_BADFLOAT(f))
f = 0;
*dest++ = f;
--- 735,739 ----
{
float f = *in++;
! if (PD_BIGORSMALL(f))
f = 0;
*dest++ = f;
Index: g_template.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_template.c,v
retrieving revision 1.1.1.3.2.2
retrieving revision 1.1.1.3.2.3
diff -C2 -d -r1.1.1.3.2.2 -r1.1.1.3.2.3
*** g_template.c 14 Jan 2004 15:50:28 -0000 1.1.1.3.2.2
--- g_template.c 23 Jul 2004 08:46:40 -0000 1.1.1.3.2.3
***************
*** 850,854 ****
{
int n2 = n/2; /* 0 to 4 */
! int ret = (n << 6); /* 0 to 256 in 5 steps */
if (ret > 255) ret = 255;
return (ret);
--- 850,854 ----
{
int n2 = n/2; /* 0 to 4 */
! int ret = (n2 << 6); /* 0 to 256 in 5 steps */
if (ret > 255) ret = 255;
return (ret);
Index: notes.txt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/notes.txt,v
retrieving revision 1.1.1.4.2.6
retrieving revision 1.1.1.4.2.7
diff -C2 -d -r1.1.1.4.2.6 -r1.1.1.4.2.7
*** notes.txt 6 May 2004 08:28:12 -0000 1.1.1.4.2.6
--- notes.txt 23 Jul 2004 08:46:40 -0000 1.1.1.4.2.7
***************
*** 2,5 ****
--- 2,8 ----
0.38:
+ open_via_path() followed by close() fails in windows? [can't reproduce]
+ soundfiles with 3-byte samples buzz for the first readsf buffer (bug/x.pd)
+ pd -alsa -sounddev 2 fails
read xx.txt in "bad" gives warnings
mess with RME ALSA some more; ALSA readn doesn't work yet; use mmap?
***************
*** 15,19 ****
signal inlets to sense signals; fix +~ etc, vcf~, biquad~, and make a vcfb~
!
makefile to set SETUID bit on install?
loading e-mailed patches without removing headers crashes pd
--- 18,23 ----
signal inlets to sense signals; fix +~ etc, vcf~, biquad~, and make a vcfb~
! investigate long (1 second) startup time
! search path to go from calling patch, not abstraction, if different?
makefile to set SETUID bit on install?
loading e-mailed patches without removing headers crashes pd
***************
*** 44,47 ****
--- 48,54 ----
problems:
+ click on minaturized subpatch fails to "vis" it
+ gfx bug in hradio
+ elipses stick in numboxes
writesf -- "open" without "0" misses closing the previous file.
Also writesf~ acts differently if DSP is off when "open" is sent?
Index: g_hdial.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hdial.c,v
retrieving revision 1.1.1.4.2.2
retrieving revision 1.1.1.4.2.3
diff -C2 -d -r1.1.1.4.2.2 -r1.1.1.4.2.3
*** g_hdial.c 18 Nov 2003 10:34:10 -0000 1.1.1.4.2.2
--- g_hdial.c 23 Jul 2004 08:46:40 -0000 1.1.1.4.2.3
***************
*** 396,404 ****
else
{
outlet_float(x->x_gui.x_obj.ob_outlet, x->x_on = i);
if(x->x_gui.x_fsf.x_snd_able && x->x_gui.x_snd->s_thing)
pd_float(x->x_gui.x_snd->s_thing, x->x_on);
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
- x->x_on_old = x->x_on;
}
}
--- 396,404 ----
else
{
+ x->x_on_old = x->x_on;
outlet_float(x->x_gui.x_obj.ob_outlet, x->x_on = i);
if(x->x_gui.x_fsf.x_snd_able && x->x_gui.x_snd->s_thing)
pd_float(x->x_gui.x_snd->s_thing, x->x_on);
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
}
***************
*** 443,446 ****
--- 443,447 ----
else
{
+ x->x_on_old = x->x_on;
x->x_on = i;
if (x->x_gui.x_fsf.x_put_in2out)
***************
*** 451,455 ****
}
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
- x->x_on_old = x->x_on;
}
}
--- 452,455 ----
Index: g_vdial.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_vdial.c,v
retrieving revision 1.1.1.4.2.2
retrieving revision 1.1.1.4.2.3
diff -C2 -d -r1.1.1.4.2.2 -r1.1.1.4.2.3
*** g_vdial.c 18 Nov 2003 10:34:10 -0000 1.1.1.4.2.2
--- g_vdial.c 23 Jul 2004 08:46:40 -0000 1.1.1.4.2.3
***************
*** 396,404 ****
else
{
outlet_float(x->x_gui.x_obj.ob_outlet, x->x_on = i);
if(x->x_gui.x_fsf.x_snd_able && x->x_gui.x_snd->s_thing)
pd_float(x->x_gui.x_snd->s_thing, x->x_on);
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
- x->x_on_old = x->x_on;
}
}
--- 396,404 ----
else
{
+ x->x_on_old = x->x_on;
outlet_float(x->x_gui.x_obj.ob_outlet, x->x_on = i);
if(x->x_gui.x_fsf.x_snd_able && x->x_gui.x_snd->s_thing)
pd_float(x->x_gui.x_snd->s_thing, x->x_on);
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
}
***************
*** 443,446 ****
--- 443,447 ----
else
{
+ x->x_on_old = x->x_on;
x->x_on = i;
if (x->x_gui.x_fsf.x_put_in2out)
Index: d_ctl.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_ctl.c,v
retrieving revision 1.1.1.3.2.7
retrieving revision 1.1.1.3.2.8
diff -C2 -d -r1.1.1.3.2.7 -r1.1.1.3.2.8
*** d_ctl.c 28 Dec 2003 12:32:03 -0000 1.1.1.3.2.7
--- d_ctl.c 23 Jul 2004 08:46:40 -0000 1.1.1.3.2.8
***************
*** 115,119 ****
float f = x->x_value;
! if (PD_BADFLOAT(f))
x->x_value = f = 0;
if (x->x_retarget)
--- 115,119 ----
float f = x->x_value;
! if (PD_BIGORSMALL(f))
x->x_value = f = 0;
if (x->x_retarget)
***************
*** 290,294 ****
double starttime = timenow + inlet2;
t_vseg *s1, *s2, *deletefrom = 0, *snew;
! if (PD_BADFLOAT(f))
f = 0;
--- 290,294 ----
double starttime = timenow + inlet2;
t_vseg *s1, *s2, *deletefrom = 0, *snew;
! if (PD_BIGORSMALL(f))
f = 0;
Index: m_pd.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v
retrieving revision 1.1.1.4.2.14
retrieving revision 1.1.1.4.2.15
diff -C2 -d -r1.1.1.4.2.14 -r1.1.1.4.2.15
*** m_pd.h 23 May 2004 18:54:59 -0000 1.1.1.4.2.14
--- m_pd.h 23 Jul 2004 08:46:40 -0000 1.1.1.4.2.15
***************
*** 369,373 ****
EXTERN void canvas_setargs(int argc, t_atom *argv);
! EXTERN t_atom *canvas_getarg(int which);
EXTERN t_symbol *canvas_getcurrentdir(void);
EXTERN t_glist *canvas_getcurrent(void);
--- 369,373 ----
EXTERN void canvas_setargs(int argc, t_atom *argv);
! EXTERN void canvas_getargs(int *argcp, t_atom **argvp);
EXTERN t_symbol *canvas_getcurrentdir(void);
EXTERN t_glist *canvas_getcurrent(void);
***************
*** 649,654 ****
--- 649,658 ----
#define PD_BADFLOAT(f) ((((*(unsigned int*)&(f))&0x7f800000) < 0x08000000) || \
(((*(unsigned int*)&(f))&0x7f800000)==0x7f800000))
+ /* more stringent test: anything not between 1e-19 and 1e19 in absolute val */
+ #define PD_BIGORSMALL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
+ (((*(unsigned int*)&(f))&0x60000000)==0x60000000))
#else
#define PD_BADFLOAT(f) 0
+ #define PD_BIGORSMALL(f) 0
#endif
Index: d_filter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_filter.c,v
retrieving revision 1.1.1.2.8.1
retrieving revision 1.1.1.2.8.2
diff -C2 -d -r1.1.1.2.8.1 -r1.1.1.2.8.2
*** d_filter.c 8 Jul 2003 09:48:57 -0000 1.1.1.2.8.1
--- d_filter.c 23 Jul 2004 08:46:40 -0000 1.1.1.2.8.2
***************
*** 70,74 ****
last = new;
}
! if (PD_BADFLOAT(last))
last = 0;
c->c_x = last;
--- 70,74 ----
last = new;
}
! if (PD_BIGORSMALL(last))
last = 0;
c->c_x = last;
***************
*** 172,176 ****
for (i = 0; i < n; i++)
last = *out++ = coef * *in++ + feedback * last;
! if (PD_BADFLOAT(last))
last = 0;
c->c_x = last;
--- 172,176 ----
for (i = 0; i < n; i++)
last = *out++ = coef * *in++ + feedback * last;
! if (PD_BIGORSMALL(last))
last = 0;
c->c_x = last;
***************
*** 303,309 ****
last = output;
}
! if (PD_BADFLOAT(last))
last = 0;
! if (PD_BADFLOAT(prev))
prev = 0;
c->c_x1 = last;
--- 303,309 ----
last = output;
}
! if (PD_BIGORSMALL(last))
last = 0;
! if (PD_BIGORSMALL(prev))
prev = 0;
c->c_x1 = last;
***************
*** 388,392 ****
{
float output = *in++ + fb1 * last + fb2 * prev;
! if (PD_BADFLOAT(output))
output = 0;
*out++ = ff1 * output + ff2 * last + ff3 * prev;
--- 388,392 ----
{
float output = *in++ + fb1 * last + fb2 * prev;
! if (PD_BIGORSMALL(output))
output = 0;
*out++ = ff1 * output + ff2 * last + ff3 * prev;
Index: x_time.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_time.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.16.1
diff -C2 -d -r1.1.1.1 -r1.1.1.1.16.1
*** x_time.c 29 Jul 2002 17:06:01 -0000 1.1.1.1
--- x_time.c 23 Jul 2004 08:46:40 -0000 1.1.1.1.16.1
***************
*** 214,217 ****
--- 214,223 ----
}
+ static void line_set(t_line *x, t_floatarg f)
+ {
+ clock_unset(x->x_clock);
+ x->x_targetval = x->x_setval = f;
+ }
+
static void line_free(t_line *x)
{
***************
*** 242,245 ****
--- 248,253 ----
class_addmethod(line_class, (t_method)line_stop,
gensym("stop"), 0);
+ class_addmethod(line_class, (t_method)line_set,
+ gensym("set"), A_FLOAT, 0);
class_addfloat(line_class, (t_method)line_float);
}
Index: d_soundfile.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v
retrieving revision 1.1.1.2.2.18
retrieving revision 1.1.1.2.2.19
diff -C2 -d -r1.1.1.2.2.18 -r1.1.1.2.2.19
*** d_soundfile.c 15 Jul 2004 16:45:47 -0000 1.1.1.2.2.18
--- d_soundfile.c 23 Jul 2004 08:46:40 -0000 1.1.1.2.2.19
***************
*** 9,15 ****
for disk accesses (even the write routine.) Finally, the realtime objects
readsf~ and writesf~ are defined which confine disk operations to a separate
! thread so that they can be used in real time. The real-time disk access
! objects are available for linux only so far, although they could be compiled
! for Windows if someone were willing to find a Pthreads package for it. */
/* threaded soundfiler by Tim Blechmann */
--- 9,14 ----
for disk accesses (even the write routine.) Finally, the realtime objects
readsf~ and writesf~ are defined which confine disk operations to a separate
! thread so that they can be used in real time. The readsf~ and writesf~
! objects use Posix-like threads. */
/* threaded soundfiler by Tim Blechmann */
***************
*** 489,496 ****
t_atom *argv = *p_argv;
int bytespersamp = 2, bigendian = 0,
! endianness = -1, swap, filetype = FORMAT_WAVE, normalize = 0;
long onset = 0, nframes = 0x7fffffff;
t_symbol *filesym;
float rate = -1;
while (argc > 0 && argv->a_type == A_SYMBOL &&
*argv->a_w.w_symbol->s_name == '-')
--- 488,496 ----
t_atom *argv = *p_argv;
int bytespersamp = 2, bigendian = 0,
! endianness = -1, swap, filetype = -1, normalize = 0;
long onset = 0, nframes = 0x7fffffff;
t_symbol *filesym;
float rate = -1;
+
while (argc > 0 && argv->a_type == A_SYMBOL &&
*argv->a_w.w_symbol->s_name == '-')
***************
*** 558,561 ****
--- 558,587 ----
else goto usage;
}
+ if (!argc || argv->a_type != A_SYMBOL)
+ goto usage;
+ filesym = argv->a_w.w_symbol;
+
+ /* check if format not specified and fill in */
+ if (filetype < 0)
+ {
+ if (strlen(filesym->s_name) >= 5 &&
+ (!strcmp(filesym->s_name + strlen(filesym->s_name) - 4, ".aif") ||
+ !strcmp(filesym->s_name + strlen(filesym->s_name) - 4, ".AIF")))
+ filetype = FORMAT_AIFF;
+ if (strlen(filesym->s_name) >= 6 &&
+ (!strcmp(filesym->s_name + strlen(filesym->s_name) - 5, ".aiff") ||
+ !strcmp(filesym->s_name + strlen(filesym->s_name) - 5, ".AIFF")))
+ filetype = FORMAT_AIFF;
+ if (strlen(filesym->s_name) >= 5 &&
+ (!strcmp(filesym->s_name + strlen(filesym->s_name) - 4, ".snd") ||
+ !strcmp(filesym->s_name + strlen(filesym->s_name) - 4, ".SND")))
+ filetype = FORMAT_NEXT;
+ if (strlen(filesym->s_name) >= 4 &&
+ (!strcmp(filesym->s_name + strlen(filesym->s_name) - 3, ".au") ||
+ !strcmp(filesym->s_name + strlen(filesym->s_name) - 3, ".AU")))
+ filetype = FORMAT_NEXT;
+ if (filetype < 0)
+ filetype = FORMAT_WAVE;
+ }
/* don't handle AIFF floating point samples */
if (bytespersamp == 4)
***************
*** 586,592 ****
else bigendian = endianness;
swap = (bigendian != garray_ambigendian());
! if (!argc || argv->a_type != A_SYMBOL)
! goto usage;
! filesym = argv->a_w.w_symbol;
argc--; argv++;
--- 612,616 ----
else bigendian = endianness;
swap = (bigendian != garray_ambigendian());
!
argc--; argv++;
***************
*** 631,635 ****
nexthdr->ns_length = 0;
nexthdr->ns_format = swap4((bytespersamp == 3 ? NS_FORMAT_LINEAR_24 :
! (bytespersamp == 4 ? NS_FORMAT_FLOAT : NS_FORMAT_LINEAR_16)), swap);;
nexthdr->ns_sr = swap4(samplerate, swap);
nexthdr->ns_nchans = swap4(nchannels, swap);
--- 655,659 ----
nexthdr->ns_length = 0;
nexthdr->ns_format = swap4((bytespersamp == 3 ? NS_FORMAT_LINEAR_24 :
! (bytespersamp == 4 ? NS_FORMAT_FLOAT : NS_FORMAT_LINEAR_16)), swap);
nexthdr->ns_sr = swap4(samplerate, swap);
nexthdr->ns_nchans = swap4(nchannels, swap);
***************
*** 2420,2426 ****
/* arrange for the "request" condition to be signalled 16
times per buffer */
sprintf(boo, "fifosize %d\n",
x->x_fifosize);
- #ifdef DEBUG_SOUNDFILE
pute(boo);
#endif
--- 2444,2450 ----
/* arrange for the "request" condition to be signalled 16
times per buffer */
+ #ifdef DEBUG_SOUNDFILE
sprintf(boo, "fifosize %d\n",
x->x_fifosize);
pute(boo);
#endif
***************
*** 2454,2460 ****
if (wantbytes > x->x_bytelimit)
wantbytes = x->x_bytelimit;
sprintf(boo, "head %d, tail %d, size %d\n",
x->x_fifohead, x->x_fifotail, wantbytes);
- #ifdef DEBUG_SOUNDFILE
pute(boo);
#endif
--- 2478,2484 ----
if (wantbytes > x->x_bytelimit)
wantbytes = x->x_bytelimit;
+ #ifdef DEBUG_SOUNDFILE
sprintf(boo, "head %d, tail %d, size %d\n",
x->x_fifohead, x->x_fifotail, wantbytes);
pute(boo);
#endif
Index: x_misc.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_misc.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.2.1
diff -C2 -d -r1.1.1.2 -r1.1.1.2.2.1
*** x_misc.c 9 May 2003 16:03:45 -0000 1.1.1.2
--- x_misc.c 23 Jul 2004 08:46:40 -0000 1.1.1.2.2.1
***************
*** 15,18 ****
--- 15,19 ----
#include <sys/times.h>
#include <sys/param.h>
+ #include <unistd.h>
#endif
#ifdef MSW
***************
*** 106,110 ****
{
loadbang_class = class_new(gensym("loadbang"), (t_newmethod)loadbang_new, 0,
! sizeof(t_loadbang), 0, 0);
class_addmethod(loadbang_class, (t_method)loadbang_loadbang,
gensym("loadbang"), 0);
--- 107,111 ----
{
loadbang_class = class_new(gensym("loadbang"), (t_newmethod)loadbang_new, 0,
! sizeof(t_loadbang), CLASS_NOINLET, 0);
class_addmethod(loadbang_class, (t_method)loadbang_loadbang,
gensym("loadbang"), 0);
Index: d_delay.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_delay.c,v
retrieving revision 1.1.1.3.2.1
retrieving revision 1.1.1.3.2.2
diff -C2 -d -r1.1.1.3.2.1 -r1.1.1.3.2.2
*** d_delay.c 18 Nov 2003 10:34:10 -0000 1.1.1.3.2.1
--- d_delay.c 23 Jul 2004 08:46:40 -0000 1.1.1.3.2.2
***************
*** 38,41 ****
--- 38,46 ----
static void sigdelwrite_checkvecsize(t_sigdelwrite *x, int vecsize)
{
+ /*
+ LATER this should really check sample rate and blocking, once that is
+ supported. Probably we don't actually care about vecsize.
+ For now just suppress this check... */
+ #if 0
if (x->x_rsortno != ugen_getsortno())
{
***************
*** 45,48 ****
--- 50,54 ----
else if (vecsize != x->x_vecsize)
pd_error(x, "delread/delwrite/vd vector size mismatch");
+ #endif
}
***************
*** 79,83 ****
{
float f = *in++;
! if (PD_BADFLOAT(f))
f = 0;
*bp++ = f;
--- 85,89 ----
{
float f = *in++;
! if (PD_BIGORSMALL(f))
f = 0;
*bp++ = f;
Index: d_osc.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_osc.c,v
retrieving revision 1.1.1.2.2.2
retrieving revision 1.1.1.2.2.3
diff -C2 -d -r1.1.1.2.2.2 -r1.1.1.2.2.3
*** d_osc.c 25 Nov 2003 19:19:57 -0000 1.1.1.2.2.2
--- d_osc.c 23 Jul 2004 08:46:40 -0000 1.1.1.2.2.3
***************
*** 451,457 ****
*out2++ = im = coefi * re2 + coefr * im;
}
! if (PD_BADFLOAT(re))
re = 0;
! if (PD_BADFLOAT(im))
im = 0;
c->c_re = re;
--- 451,457 ----
*out2++ = im = coefi * re2 + coefr * im;
}
! if (PD_BIGORSMALL(re))
re = 0;
! if (PD_BIGORSMALL(im))
im = 0;
c->c_re = re;