diff --git a/externals/ext13/streamin13~.c b/externals/ext13/streamin13~.c index 32ac03b201310cfd1624821a1ce0b091c8d3a598..9ef6bc308d4fb32cacfd9b8c107705d65727246b 100644 --- a/externals/ext13/streamin13~.c +++ b/externals/ext13/streamin13~.c @@ -187,7 +187,8 @@ static t_int *streamin13_perform(t_int *w) for (i=0;i < x->x_n;i++) { out[i] = (t_float *)(w[offset+i]); } - if (x->x_connectsocket){ + + if (x->x_connectsocket >= 0){ timeout.tv_sec = 0; timeout.tv_usec = 0; @@ -210,8 +211,11 @@ static t_int *streamin13_perform(t_int *w) } } } - free(out); - return (w+offset+1+i); + +#ifdef _WIN32 + free(out); +#endif + return (w+offset+i); } else { x->x_ndone++; } @@ -276,7 +280,7 @@ static t_int *streamin13_perform(t_int *w) #ifdef _WIN32 free(out); #endif - return (w+offset+1+i); + return (w+offset+i); } @@ -284,14 +288,14 @@ static t_int *streamin13_perform(t_int *w) static void streamin13_dsp(t_streamin13 *x, t_signal **sp) { int i; - t_int** myvec = getbytes(sizeof(t_int)*(x->x_n + 3)); + t_int** myvec = getbytes(sizeof(t_int)*(x->x_n + 2)); myvec[0] = (t_int*)x; myvec[1] = (t_int*)sp[0]->s_n; for (i=0;i < x->x_n;i++) myvec[2 + i] = (t_int*)sp[i]->s_vec; - dsp_addv(streamin13_perform, (t_int)(x->x_n + 3), (t_int*)myvec); - freebytes(myvec,sizeof(t_int)*(x->x_n + 3)); + dsp_addv(streamin13_perform, x->x_n + 2, (t_int*)myvec); + freebytes(myvec,sizeof(t_int)*(x->x_n + 2)); } diff --git a/externals/ext13/streamout13~.c b/externals/ext13/streamout13~.c index 714c1b0e3924555cbb61eff931c8583ffb75363b..817583248e100bbd4ef97fe0400b91df3abc9e02 100644 --- a/externals/ext13/streamout13~.c +++ b/externals/ext13/streamout13~.c @@ -172,7 +172,6 @@ static t_int *streamout13_perform(t_int *w) in[i] = (t_float *)(w[offset+i]); } - if (x->x_fd > 0){ if (n != x->nsamples) @@ -272,7 +271,7 @@ static t_int *streamout13_perform(t_int *w) #ifdef _WIN32 free(in); #endif - return (w + 2 + i * 2); + return (w + 3 + i); } static void streamout13_dsp(t_streamout13 *x, t_signal **sp) @@ -280,15 +279,16 @@ static void streamout13_dsp(t_streamout13 *x, t_signal **sp) /* dsp_add(streamout13_perform, 3, x, sp[0]->s_vec, (t_int)sp[0]->s_n); */ + int i; - t_int** myvec = getbytes(sizeof(t_int)*(x->x_n + 3)); + t_int** myvec = getbytes(sizeof(t_int)*(x->x_n + 2)); myvec[0] = (t_int*)x; myvec[1] = (t_int*)sp[0]->s_n; for (i=0;i < x->x_n/*+1*/;i++) myvec[2 + i] = (t_int*)sp[i]->s_vec; - dsp_addv(streamout13_perform, (t_int)(x->x_n + 3), (t_int*)myvec); - freebytes(myvec,sizeof(t_int)*(x->x_n + 3)); + dsp_addv(streamout13_perform, x->x_n + 2, (t_int *)myvec); + freebytes(myvec,sizeof(t_int)*(x->x_n + 2)); } static void streamout13_grain(t_streamout13 *x,t_floatarg grain)