From 2090825fd23dd4a251b37699839eb72790dc4065 Mon Sep 17 00:00:00 2001 From: Miller Puckette <msp@ucsd.edu> Date: Thu, 21 Aug 2008 13:48:51 -0700 Subject: [PATCH] Mac startup bug fix; 32ch limit back into s_audio_pa.c --- linux/make-release | 4 +++- src/s_audio_pa.c | 2 ++ src/t_tkcmd.c | 16 ++++++++++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/linux/make-release b/linux/make-release index 45166559c..7a073f9ce 100755 --- a/linux/make-release +++ b/linux/make-release @@ -32,6 +32,8 @@ make distclean rm -rf autom4te.cache rm -f *.pd cd /tmp -tar cf - pd-$1 | gzip > $ROOTDIR/archive/dist/pd-$1.src.tar.gz +tar czf pd-$1.src.tar.gz pd-$1 rm -rf $TMPPD +mv -i pd-$1.src.tar.gz $ROOTDIR/archive/dist/ && \ ls -l $ROOTDIR/archive/dist/pd-$1.src.tar.gz + diff --git a/src/s_audio_pa.c b/src/s_audio_pa.c index c346b3368..e02cbc9e1 100644 --- a/src/s_audio_pa.c +++ b/src/s_audio_pa.c @@ -14,6 +14,8 @@ #include <portaudio.h> #include "s_audio_pablio.h" +#define MAX_PA_CHANS 32 +#define MAX_SAMPLES_PER_FRAME (MAX_PA_CHANS * DEFDACBLKSIZE) /* LATER try to figure out how to handle default devices in portaudio; the way s_audio.c handles them isn't going to work here. */ diff --git a/src/t_tkcmd.c b/src/t_tkcmd.c index bd6ff5a5d..680db0906 100644 --- a/src/t_tkcmd.c +++ b/src/t_tkcmd.c @@ -333,7 +333,7 @@ gotit: ; #ifdef STARTGUI -/* #define DEBUGCONNECT */ +#define DEBUGCONNECT #ifdef DEBUGCONNECT static FILE *debugfd; @@ -618,11 +618,19 @@ void pdgui_setname(char *s) int Pdtcl_Init(Tcl_Interp *interp) { const char *argv = Tcl_GetVar(interp, "argv", 0); - int portno, argno = 0; - if (argv && (portno = atoi(argv)) > 1) + int portno = 0, i; + if (argv) + { + for (i = 0; i < strlen(argv) - 1; i++) + if (argv[i] >= '0' && argv[i] <= '9') + { + portno = atoi(argv+i); + break; + } + } + if (portno) pdgui_setsock(portno); #ifdef DEBUGCONNECT - pd_portno = portno; debugfd = fopen("/tmp/bratwurst", "w"); fprintf(debugfd, "turning stderr back on\n"); fflush(debugfd); -- GitLab