[PD-cvs] pd/src s_audio.c, 1.5.4.16.2.1, 1.5.4.16.2.2 s_path.c, 1.3.4.6, 1.3.4.6.2.1 t_tkcmd.c, 1.2.4.1.2.5, 1.2.4.1.2.6 u_main.tk, 1.4.4.10.2.10, 1.4.4.10.2.11

Tim Blechmann timblech at users.sourceforge.net
Sun Oct 16 12:46:43 CEST 2005


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7409

Modified Files:
      Tag: devel_0_39
	s_audio.c s_path.c t_tkcmd.c u_main.tk 
Log Message:
selection of miller's updates to 0.39-1test1

Index: s_audio.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v
retrieving revision 1.5.4.16.2.1
retrieving revision 1.5.4.16.2.2
diff -C2 -d -r1.5.4.16.2.1 -r1.5.4.16.2.2
*** s_audio.c	14 Jul 2005 23:17:33 -0000	1.5.4.16.2.1
--- s_audio.c	16 Oct 2005 10:46:40 -0000	1.5.4.16.2.2
***************
*** 27,30 ****
--- 27,36 ----
  #define SYS_XFERSAMPS (SYS_DEFAULTCH*sys_dacblocksize)
  #define SYS_XFERSIZE (SYS_SAMPLEWIDTH * SYS_XFERSAMPS)
+ #define MAXNDEV 20
+ #define DEVDESCSIZE 80
+  
+ static void audio_getdevs(char *indevlist, int *nindevs,
+ 	char *outdevlist, int *noutdevs, int *canmulti, 
+ 	int maxndev, int devdescsize);
  
      /* these are set in this file when opening audio, but then may be reduced,
***************
*** 199,202 ****
--- 205,215 ----
      int realinchans[MAXAUDIOINDEV], realoutchans[MAXAUDIOOUTDEV];
  
+ 	char indevlist[MAXNDEV*DEVDESCSIZE], outdevlist[MAXNDEV*DEVDESCSIZE];
+ 	int indevs = 0, outdevs = 0, canmulti = 0;
+ 	audio_getdevs(indevlist, &indevs, outdevlist, &outdevs, &canmulti,
+ 		MAXNDEV, DEVDESCSIZE);
+  
+ 
+ 	
      /* jsarlo { (*/
      if (sys_externalschedlib)
***************
*** 224,231 ****
          if (nchindev == -1)
          {
!             nchindev=1;
!             chindev[0] = defaultchannels;
!             naudioindev = 1;
!             audioindev[0] = DEFAULTAUDIODEV;
          }
          else
--- 237,248 ----
          if (nchindev == -1)
          {
!             if (indevs >= 1)
!             {
!                 nchindev=1;
!                 chindev[0] = defaultchannels;
!                 naudioindev = 1;
!                 audioindev[0] = DEFAULTAUDIODEV;
!             }
!             else naudioindev = nchindev = 0;
          }
          else
***************
*** 270,277 ****
          if (nchoutdev == -1)
          {
!             nchoutdev=1;
!             choutdev[0]=defaultchannels;
!             naudiooutdev=1;
!             audiooutdev[0] = DEFAULTAUDIODEV;
          }
          else
--- 287,298 ----
          if (nchoutdev == -1)
          {
!             if (outdevs >= 1)
!             {
!                 nchoutdev=1;
!                 choutdev[0]=defaultchannels;
!                 naudiooutdev=1;
!                 audiooutdev[0] = DEFAULTAUDIODEV;
!             }
!             else nchoutdev = naudiooutdev = 0;
          }
          else
***************
*** 566,572 ****
  }
  
- #define MAXNDEV 20
- #define DEVDESCSIZE 80
- 
  /* tb: removed static flag */
  void audio_getdevs(char *indevlist, int *nindevs,
--- 587,590 ----
***************
*** 680,683 ****
--- 698,702 ----
  }
  
+ 
      /* start an audio settings dialog window */
  void glob_audio_properties(t_pd *dummy, t_floatarg flongform)

Index: t_tkcmd.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/t_tkcmd.c,v
retrieving revision 1.2.4.1.2.5
retrieving revision 1.2.4.1.2.6
diff -C2 -d -r1.2.4.1.2.5 -r1.2.4.1.2.6
*** t_tkcmd.c	4 Oct 2005 16:42:33 -0000	1.2.4.1.2.5
--- t_tkcmd.c	16 Oct 2005 10:46:40 -0000	1.2.4.1.2.6
***************
*** 480,490 ****
  static void pdgui_setupsocket(void)
  {
- #ifdef DEBUGCONNECT
-         debugfd = fopen("/Users/msp/bratwurst", "w");
-         fprintf(debugfd, "turning stderr back on\n");
-         fflush(debugfd);
-         dup2(fileno(debugfd), 2);
-         fprintf(stderr, "duped to stderr?\n");
- #endif
  #ifdef MSW
          pdgui_connecttosocket();
--- 480,483 ----
***************
*** 625,630 ****
--- 618,641 ----
      const char *argv = Tcl_GetVar(interp, "argv", 0);
      int portno, argno = 0;
+         /* argument passing seems to be different in MSW as opposed to
+         unix-likes.  Here we check if we got sent a "port number" as an
+         argument.  If so. we're to connect to a previously running pd (i.e.,
+         pd got started first).  If not, we start Pd from here. */
+ #ifdef MSW
      if (argv && (portno = atoi(argv)) > 1)
+ #else
+     char *firstspace;
+     if (argv && (firstspace = strchr(argv, ' ')) && (portno = atoi(firstspace)) > 1)
+ #endif
          pdgui_setsock(portno);
+ #ifdef DEBUGCONNECT
+     debugfd = fopen("/Users/msp/bratwurst", "w");
+     fprintf(debugfd, "turning stderr back on\n");
+     fflush(debugfd);
+     dup2(fileno(debugfd), 2);
+     fprintf(stderr, "duped to stderr?\n");
+     fprintf(stderr, "portno %d\n", pd_portno);
+     fprintf(stderr, "argv %s\n", argv);
+ #endif
      tk_pdinterp = interp;
      pdgui_startup(interp);

Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.4.4.10.2.10
retrieving revision 1.4.4.10.2.11
diff -C2 -d -r1.4.4.10.2.10 -r1.4.4.10.2.11
*** u_main.tk	4 Oct 2005 22:35:08 -0000	1.4.4.10.2.10
--- u_main.tk	16 Oct 2005 10:46:40 -0000	1.4.4.10.2.11
***************
*** 64,71 ****
              if {$pd_macready != 0} {
                  pd [concat pd open [pdtk_enquote [file tail $file]] \
! 		    [pdtk_enquote  [file dirname $file]] \;]
! 		    menu_doc_open [file dirname $file] [file tail $file]
!             } else {
!                 set pd_macdropped $args
              }
          }
--- 64,68 ----
              if {$pd_macready != 0} {
                  pd [concat pd open [pdtk_enquote [file tail $file]] \
!                     [pdtk_enquote  [file dirname $file]] \;]
              }
          }

Index: s_path.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_path.c,v
retrieving revision 1.3.4.6
retrieving revision 1.3.4.6.2.1
diff -C2 -d -r1.3.4.6 -r1.3.4.6.2.1
*** s_path.c	6 May 2005 10:36:30 -0000	1.3.4.6
--- s_path.c	16 Oct 2005 10:46:40 -0000	1.3.4.6.2.1
***************
*** 374,377 ****
--- 374,383 ----
      char  buf[1000];
  	char c[MAXPDSTRING];
+ 	int retval = 1; /* that's what we will return at the end; for now, let's think it'll be an error */
+ 	 
+ 	/* initialize rc-arg-array so we can safely clean up at the end */
+ 	for (i = 1; i < NUMARGS-1; i++)
+ 		rcargv[i]=0;
+  
  
      /* parse a startup file */
***************
*** 401,405 ****
  				buf[1000] = 0;
  				if (!(rcargv[i] = malloc(strlen(buf) + 1)))
! 					return (1);
  				strcpy(rcargv[i], buf);
  				strcpy(buf,c+strlen(buf)+1);
--- 407,411 ----
  				buf[1000] = 0;
  				if (!(rcargv[i] = malloc(strlen(buf) + 1)))
! 					goto cleanup;
  				strcpy(rcargv[i], buf);
  				strcpy(buf,c+strlen(buf)+1);
***************
*** 432,438 ****
      {
          post("error parsing RC arguments");
!         return (1);
      }
!     return (0);
  }
  
--- 438,450 ----
      {
          post("error parsing RC arguments");
! 		goto cleanup;
      }
! 	retval=0; /* we made it without an error */
!  
!  cleanup: /* prevent memleak */
! 	for (i = 1; i < NUMARGS-1; i++)
! 		if(rcargv[i])free(rcargv[i]);
! 	
! 	return(retval);
  }
  
***************
*** 444,448 ****
  int sys_rcfile(void)
  {
!   char fname[MAXPDSTRING], *home = getenv("HOME");
  
    // parse a startup file */
--- 456,460 ----
  int sys_rcfile(void)
  {
! 	char fname[MAXPDSTRING], *home = getenv("HOME");
  
    // parse a startup file */





More information about the Pd-cvs mailing list