From c4420064e209e065d01510830a0cef9e3305f921 Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Sun, 16 Mar 2008 19:12:49 +0000 Subject: 0.41-2 release svn path=/trunk/; revision=9589 --- pd/doc/1.manual/x5.htm | 7 ++++++- pd/src/g_io.c | 6 ++++++ pd/src/m_obj.c | 2 ++ pd/src/m_pd.h | 2 +- pd/src/s_audio_mmio.c | 2 +- pd/src/s_inter.c | 8 +++++--- pd/src/s_path.c | 4 ++-- pd/src/u_main.tk | 2 +- pd/src/u_pdsend.c | 2 +- pd/src/x_net.c | 2 +- 10 files changed, 26 insertions(+), 11 deletions(-) diff --git a/pd/doc/1.manual/x5.htm b/pd/doc/1.manual/x5.htm index 3b43cbcc..fcef5975 100644 --- a/pd/doc/1.manual/x5.htm +++ b/pd/doc/1.manual/x5.htm @@ -20,9 +20,14 @@

5.1. release notes

+

------------------ 0.41-2 ---------------------------- + +

More bug fixes: large netsends dropping messages, and crash bug when turning +DSP on and off repeatedly in MS windows +

------------------ 0.41-1 ---------------------------- -Fixed a startup problem for Mac OSX 10.5.1 (other platforms should not be affected) +

Fixed a startup problem for Mac OSX 10.5.1 (other platforms should not be affected)

------------------ 0.41 ---------------------------- diff --git a/pd/src/g_io.c b/pd/src/g_io.c index 2ee89c1c..dd7583cc 100644 --- a/pd/src/g_io.c +++ b/pd/src/g_io.c @@ -168,6 +168,9 @@ void vinlet_dspprolog(struct _vinlet *x, t_signal **parentsigs, int downsample, int upsample, int reblock, int switched) { t_signal *insig, *outsig; + /* no buffer means we're not a signal inlet */ + if (!x->x_buf) + return; x->x_updown.downsample = downsample; x->x_updown.upsample = upsample; @@ -435,6 +438,9 @@ void voutlet_dspprolog(struct _voutlet *x, t_signal **parentsigs, int myvecsize, int calcsize, int phase, int period, int frequency, int downsample, int upsample, int reblock, int switched) { + /* no buffer means we're not a signal outlet */ + if (!x->x_buf) + return; x->x_updown.downsample=downsample; x->x_updown.upsample=upsample; x->x_justcopyout = (switched && !reblock); diff --git a/pd/src/m_obj.c b/pd/src/m_obj.c index 3f8bcda4..df8a2c12 100644 --- a/pd/src/m_obj.c +++ b/pd/src/m_obj.c @@ -687,6 +687,8 @@ int inlet_getsignalindex(t_inlet *x) { int n = 0; t_inlet *i; + if (x->i_symfrom != &s_signal) + bug("inlet_getsignalindex"); for (i = x->i_owner->ob_inlet, n = 0; i && i != x; i = i->i_next) if (i->i_symfrom == &s_signal) n++; return (n); diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h index 558bd4d2..2428c705 100644 --- a/pd/src/m_pd.h +++ b/pd/src/m_pd.h @@ -10,7 +10,7 @@ extern "C" { #define PD_MAJOR_VERSION 0 #define PD_MINOR_VERSION 41 -#define PD_BUGFIX_VERSION 1 +#define PD_BUGFIX_VERSION 2 #define PD_TEST_VERSION "" /* old name for "MSW" flag -- we have to take it for the sake of many old diff --git a/pd/src/s_audio_mmio.c b/pd/src/s_audio_mmio.c index cf79f135..fd17a1ce 100644 --- a/pd/src/s_audio_mmio.c +++ b/pd/src/s_audio_mmio.c @@ -709,7 +709,7 @@ int mmio_open_audio(int naudioindev, int *audioindev, nbuf = MAXBUFFER; } else if (nbuf < 4) nbuf = 4; - fprintf(stderr, "%d audio buffers\n", nbuf); + /* fprintf(stderr, "%d audio buffers\n", nbuf); */ nt_naudiobuffer = nbuf; if (nt_adcjitterbufsallowed > nbuf - 2) nt_adcjitterbufsallowed = nbuf - 2; diff --git a/pd/src/s_inter.c b/pd/src/s_inter.c index 605981c6..8ed6f373 100644 --- a/pd/src/s_inter.c +++ b/pd/src/s_inter.c @@ -418,12 +418,12 @@ void socketreceiver_free(t_socketreceiver *x) static int socketreceiver_doread(t_socketreceiver *x) { char messbuf[INBUFSIZE], *bp = messbuf; - int indx; + int indx, first = 1; int inhead = x->sr_inhead; int intail = x->sr_intail; char *inbuf = x->sr_inbuf; - if (intail == inhead) return (0); - for (indx = intail; indx != inhead; indx = (indx+1)&(INBUFSIZE-1)) + for (indx = intail; first || (indx != inhead); + first = 0, (indx = (indx+1)&(INBUFSIZE-1))) { /* if we hit a semi that isn't preceeded by a \, it's a message boundary. LATER we should deal with the possibility that the @@ -544,6 +544,8 @@ void socketreceiver_read(t_socketreceiver *x, int fd) if (x->sr_socketreceivefn) (*x->sr_socketreceivefn)(x->sr_owner, inbinbuf); else binbuf_eval(inbinbuf, 0, 0, 0); + if (x->sr_inhead == x->sr_intail) + break; } } } diff --git a/pd/src/s_path.c b/pd/src/s_path.c index dbc28316..a3b812f9 100644 --- a/pd/src/s_path.c +++ b/pd/src/s_path.c @@ -531,7 +531,7 @@ void glob_start_path_dialog(t_pd *dummy) int i; t_namelist *nl; - sys_vgui("pd_set pd_path \"\"\n"); + sys_gui("global pd_path; set pd_path {}\n"); for (nl = sys_searchpath, i = 0; nl; nl = nl->nl_next, i++) sys_vgui("lappend pd_path \"%s\"\n", nl->nl_string); sprintf(buf, "pdtk_path_dialog %%s %d %d\n", sys_usestdpath, sys_verbose); @@ -561,7 +561,7 @@ void glob_start_startup_dialog(t_pd *dummy) int i; t_namelist *nl; - sys_vgui("pd_set pd_startup \"\"\n"); + sys_gui("global pd_startup; set pd_startup {}\n"); for (nl = sys_externlist, i = 0; nl; nl = nl->nl_next, i++) sys_vgui("lappend pd_startup \"%s\"\n", nl->nl_string); sprintf(buf, "pdtk_startup_dialog %%s %d \"%s\"\n", sys_defeatrt, diff --git a/pd/src/u_main.tk b/pd/src/u_main.tk index 5b9d4e74..1ad84f08 100644 --- a/pd/src/u_main.tk +++ b/pd/src/u_main.tk @@ -3517,7 +3517,7 @@ proc pdtk_pd_texteditor {stuff} { proc pdtk_pastetext {} { global pdtk_pastebuffer set pdtk_pastebuffer "" - catch {global pdtk_pastebuffer; set pdtk_pastebuffer [selection get]} + catch {global pdtk_pastebuffer; set pdtk_pastebuffer [clipboard get]} # puts stderr [concat paste $pdtk_pastebuffer] for {set i 0} {$i < [string length $pdtk_pastebuffer]} {incr i 1} { set cha [string index $pdtk_pastebuffer $i] diff --git a/pd/src/u_pdsend.c b/pd/src/u_pdsend.c index 663889cc..e36ad94a 100644 --- a/pd/src/u_pdsend.c +++ b/pd/src/u_pdsend.c @@ -112,7 +112,7 @@ connected: ; nsend = strlen(buf); for (bp = buf, nsent = 0; nsent < nsend;) { - int res = send(sockfd, buf, nsend-nsent, 0); + int res = send(sockfd, bp, nsend-nsent, 0); if (res < 0) { sockerror("send"); diff --git a/pd/src/x_net.c b/pd/src/x_net.c index d4985dfa..9d1aee0b 100644 --- a/pd/src/x_net.c +++ b/pd/src/x_net.c @@ -129,7 +129,7 @@ static void netsend_send(t_netsend *x, t_symbol *s, int argc, t_atom *argv) static double lastwarntime; static double pleasewarn; double timebefore = sys_getrealtime(); - int res = send(x->x_fd, buf, length-sent, 0); + int res = send(x->x_fd, bp, length-sent, 0); double timeafter = sys_getrealtime(); int late = (timeafter - timebefore > 0.005); if (late || pleasewarn) -- cgit v1.2.1