[PD-dev] Re: CVS access

guenter geiger geiger at xdv.org
Sun Feb 22 21:24:20 CET 2004


On Sun, 22 Feb 2004, Mathieu Bouchard wrote:
> On Sun, 22 Feb 2004, guenter geiger wrote:
>
> > On Sun, 22 Feb 2004, Mathieu Bouchard wrote:
> > > I think I fixed it, by committing older versions back on top of my
> > > versions.
> > > In any case, I think I had to tell you...
> > Ok, thanks, everything seems to be ok.
> > I updated the HEAD to 0.37-1test6 and merged in the changes
> > from millers version into devel_0_37.
>
> Ok, I have three questions:
>
> 1. All those changes you just merged in seem to have changed almost
> every line in a lot of files. I thought it could be something like messing
> with newline codes or switching between tabs and spaces, but it seems that
> lines that only have one brace on it don't get modified. What is this?
> Is it a change of indentation style? I usually try to avoid those, as they
> make it more difficult to apply diffs / merge branches... What is your
> opinion on this?

My opinion on this is that you are wrong, please see the attched pd-merge
file to get an idea about what was changed.

Question 2: Johannes handles the mailing lists at IEM
Question 3: The easiest solution would be to have the CVS somewhere else.
The BEST solution would be to have it at Millers place.

Guenter


>
> 2. I got several mails from pd-cvs saying my messages (sent from cvs
> commit) were frozen waiting for moderator approval. Who is in charge of
> approving those?
>
> 3. How often does SourceForge update their mirrors? is it every 2 or 4
> hours or...? Because I work with people who don't have dev accounts and
> somehow it ain't quite as snappy in SourceForge than on Artengine's CVS
> (that doesn't use mirrors/delays). How do you people do? Do you send
> temporary diffs by email?
>
> ________________________________________________________________
> Mathieu Bouchard                       http://artengine.ca/matju
>

-------------- next part --------------
diff -rc pd/src/CVS/Entries pd-devel/src/CVS/Entries
*** pd/src/CVS/Entries	Sun Feb 22 21:01:08 2004
--- pd-devel/src/CVS/Entries	Sun Feb 22 20:46:11 2004
***************
*** 1,7 ****
  /.cvsignore/1.1.2.2/Tue Oct 14 10:12:43 2003//Tdevel_0_37
  /build.bat/1.1.2.1/Sat Sep 13 08:33:33 2003//Tdevel_0_37
- /configure/1.1.1.4.2.9/Wed Jan 14 15:42:14 2004//Tdevel_0_37
- /configure.in/1.1.1.4.2.9/Wed Jan 14 15:42:14 2004//Tdevel_0_37
  /d_arithmetic.c/1.1.1.1.16.6/Tue Dec 30 16:38:33 2003//Tdevel_0_37
  /d_array.c/1.1.1.3.2.1/Fri Sep 12 20:56:06 2003//Tdevel_0_37
  /d_ctl.c/1.1.1.3.2.7/Sun Dec 28 12:32:03 2003//Tdevel_0_37
--- 1,5 ----
***************
*** 16,22 ****
  /d_misc.c/1.1.1.1.16.2/Wed Oct 29 12:57:42 2003//Tdevel_0_37
  /d_osc.c/1.1.1.2.2.2/Tue Nov 25 19:19:57 2003//Tdevel_0_37
  /d_resample.c/1.1.1.1/Mon Jul 29 17:05:57 2002//Tdevel_0_37
- /d_soundfile.c/1.1.1.2.2.1/Tue Jul  8 09:48:57 2003//Tdevel_0_37
  /d_ugen.c/1.1.1.2.2.6/Tue Dec 23 01:15:39 2003//Tdevel_0_37
  /g_all_guis.c/1.1.1.4.2.4/Wed Jan 14 15:50:28 2004//Tdevel_0_37
  /g_all_guis.h/1.1.1.4.2.2/Tue Nov 18 10:34:10 2003//Tdevel_0_37
--- 14,19 ----
***************
*** 24,42 ****
  /g_bang.c/1.1.1.3.2.2/Tue Nov 18 10:34:10 2003//Tdevel_0_37
  /g_canvas.c/1.1.1.4.2.7/Wed Jan 14 15:50:28 2004//Tdevel_0_37
  /g_canvas.h/1.1.1.4.2.4/Tue Nov 25 19:19:57 2003//Tdevel_0_37
- /g_editor.c/1.1.1.4.2.3/Tue Nov 25 19:19:57 2003//Tdevel_0_37
  /g_graph.c/1.1.1.3.2.3/Tue Nov 25 19:19:57 2003//Tdevel_0_37
  /g_guiconnect.c/1.1.1.1/Mon Jul 29 17:05:58 2002//Tdevel_0_37
  /g_hdial.c/1.1.1.4.2.2/Tue Nov 18 10:34:10 2003//Tdevel_0_37
  /g_hslider.c/1.1.1.3.2.2/Tue Nov 18 10:34:10 2003//Tdevel_0_37
  /g_io.c/1.1.1.1.16.2/Tue Nov 25 19:19:57 2003//Tdevel_0_37
- /g_mycanvas.c/1.1.1.3.2.2/Tue Nov 18 10:34:10 2003//Tdevel_0_37
  /g_numbox.c/1.1.1.4.2.2/Tue Nov 18 10:34:10 2003//Tdevel_0_37
  /g_readwrite.c/1.1.1.3.2.1/Tue Sep 23 00:44:54 2003//Tdevel_0_37
  /g_rtext.c/1.1.1.2.2.6/Tue Nov 18 10:34:10 2003//Tdevel_0_37
  /g_scalar.c/1.1.1.2.2.2/Tue Nov 18 10:34:10 2003//Tdevel_0_37
  /g_template.c/1.1.1.3.2.2/Wed Jan 14 15:50:28 2004//Tdevel_0_37
- /g_text.c/1.1.1.4.2.2/Fri Sep 12 20:55:31 2003//Tdevel_0_37
  /g_toggle.c/1.1.1.3.2.2/Tue Nov 18 10:34:10 2003//Tdevel_0_37
  /g_traversal.c/1.1.1.1/Mon Jul 29 17:05:58 2002//Tdevel_0_37
  /g_vdial.c/1.1.1.4.2.2/Tue Nov 18 10:34:10 2003//Tdevel_0_37
--- 21,36 ----
***************
*** 47,59 ****
  /m_binbuf.c/1.1.1.4.2.4/Tue Nov 18 10:34:10 2003//Tdevel_0_37
  /m_class.c/1.1.1.2.2.4/Sun Feb 22 05:52:16 2004//Tdevel_0_37
  /m_conf.c/1.1.1.3/Fri May  9 16:03:43 2003//Tdevel_0_37
- /m_glob.c/1.1.1.2.2.5/Sun Feb 22 05:52:16 2004//Tdevel_0_37
  /m_imp.h/1.1.1.2.2.2/Tue Nov 25 19:19:57 2003//Tdevel_0_37
  /m_memory.c/1.1.1.2/Fri May  9 16:03:43 2003//Tdevel_0_37
  /m_obj.c/1.1.1.3.2.4/Thu Dec 11 13:41:43 2003//Tdevel_0_37
  /m_pd.c/1.1.1.2.2.1/Fri Sep 12 20:58:08 2003//Tdevel_0_37
  /m_pd.h/1.1.1.4.2.12/Sun Feb 22 05:52:16 2004//Tdevel_0_37
- /m_sched.c/1.1.1.2.2.7/Wed Jan 14 15:50:28 2004//Tdevel_0_37
  /m_simd.h/1.1.2.4/Sun Dec 28 12:32:03 2003//Tdevel_0_37
  /m_simd_def.h/1.1.2.3/Mon Dec 29 02:01:57 2003//Tdevel_0_37
  /m_simd_sse_gcc.c/1.1.2.1/Tue Dec 23 01:15:39 2003//Tdevel_0_37
--- 41,51 ----
***************
*** 63,84 ****
  /m_simd_ve_gcc.c/1.1.2.3/Mon Dec 29 02:01:57 2003//Tdevel_0_37
  /m_simd_ve_gcc.h/1.1.2.3/Mon Dec 29 02:01:57 2003//Tdevel_0_37
  /makefile.clean/1.1.1.1/Mon Jul 29 17:05:59 2002//Tdevel_0_37
- /makefile.dependencies/1.1.1.1/Mon Jul 29 17:05:59 2002//Tdevel_0_37
  /makefile.in/1.1.1.3.2.12/Wed Jan 14 15:42:49 2004//Tdevel_0_37
  /makefile.irix/1.1.1.1/Mon Jul 29 17:05:59 2002//Tdevel_0_37
  /makefile.nt/1.1.1.3.2.2/Sat Dec 27 11:32:43 2003//Tdevel_0_37
  /notes.txt/1.1.1.4.2.5/Wed Jan 14 15:45:39 2004//Tdevel_0_37
- /s_audio.c/1.1.1.1.2.7/Wed Jan 14 15:50:28 2004//Tdevel_0_37
- /s_audio_alsa.c/1.1.1.1.2.6/Sun Feb 22 16:40:40 2004//Tdevel_0_37
  /s_audio_jack.c/1.1.2.6/Wed Jan 21 19:53:36 2004//Tdevel_0_37
- /s_audio_mmio.c/1.1.1.1.2.2/Fri Sep 12 21:02:15 2003//Tdevel_0_37
- /s_audio_oss.c/1.1.1.1.2.6/Sun Feb 22 16:40:40 2004//Tdevel_0_37
  /s_audio_pa.c/1.1.1.1.2.6/Wed Jan 14 15:50:28 2004//Tdevel_0_37
  /s_entry.c/1.1.1.2/Fri May  9 16:03:44 2003//Tdevel_0_37
  /s_file.c/1.1.1.2/Fri May  9 16:03:44 2003//Tdevel_0_37
- /s_inter.c/1.1.1.3.2.9/Wed Jan 21 19:53:04 2004//Tdevel_0_37
  /s_loader.c/1.1.1.2/Fri May  9 16:03:44 2003//Tdevel_0_37
- /s_main.c/1.1.1.4.2.10/Sat Feb 21 22:05:20 2004//Tdevel_0_37
  /s_midi.c/1.1.1.1.2.3/Tue Nov 18 10:34:10 2003//Tdevel_0_37
  /s_midi_mmio.c/1.1.2.2/Wed Jan 14 15:50:28 2004//Tdevel_0_37
  /s_midi_oss.c/1.1.1.1.2.2/Sat Aug  2 15:37:49 2003//Tdevel_0_37
--- 55,69 ----
***************
*** 104,107 ****
--- 89,107 ----
  /x_net.c/1.1.1.2/Fri May  9 16:03:45 2003//Tdevel_0_37
  /x_qlist.c/1.1.1.2/Fri May  9 16:03:45 2003//Tdevel_0_37
  /x_time.c/1.1.1.1/Mon Jul 29 17:06:01 2002//Tdevel_0_37
+ /s_audio_oss.c/1.1.1.1.2.6/Sun Feb 22 16:49:54 2004//Tdevel_0_37
+ /makefile.dependencies/1.1.1.1/Sun Feb 22 17:33:11 2004//Tdevel_0_37
+ /d_soundfile.c/1.1.1.2.2.2/Sun Feb 22 17:18:11 2004//Tdevel_0_37
+ /g_editor.c/1.1.1.4.2.4/Sun Feb 22 17:18:21 2004//Tdevel_0_37
+ /g_mycanvas.c/1.1.1.3.2.3/Sun Feb 22 17:18:21 2004//Tdevel_0_37
+ /g_text.c/1.1.1.4.2.3/Sun Feb 22 17:18:21 2004//Tdevel_0_37
+ /m_glob.c/1.1.1.2.2.6/Sun Feb 22 17:23:06 2004//Tdevel_0_37
+ /m_sched.c/1.1.1.2.2.8/Sun Feb 22 17:18:21 2004//Tdevel_0_37
+ /s_audio.c/1.1.1.1.2.8/Sun Feb 22 17:24:40 2004//Tdevel_0_37
+ /s_audio_alsa.c/1.1.1.1.2.7/Sun Feb 22 17:28:06 2004//Tdevel_0_37
+ /s_audio_mmio.c/1.1.1.1.2.3/Sun Feb 22 17:18:54 2004//Tdevel_0_37
+ /s_inter.c/1.1.1.3.2.10/Sun Feb 22 17:19:06 2004//Tdevel_0_37
+ /s_main.c/1.1.1.4.2.11/Sun Feb 22 17:19:06 2004//Tdevel_0_37
+ /configure/1.1.1.4.2.9/Sun Feb 22 19:46:11 2004//Tdevel_0_37
+ /configure.in/1.1.1.4.2.9/Sun Feb 22 19:46:11 2004//Tdevel_0_37
  D
diff -rc pd/src/CVS/Root pd-devel/src/CVS/Root
*** pd/src/CVS/Root	Sun Feb 22 20:59:59 2004
--- pd-devel/src/CVS/Root	Sun Feb 22 17:43:19 2004
***************
*** 1 ****
! :pserver:anonymous:@cvs.sf.net/cvsroot/pure-data
--- 1 ----
! :ext:ggeiger at cvs.sf.net/cvsroot/pure-data
Only in pd-devel/src/: config.log
Only in pd-devel/src/: config.status
diff -rc pd/src/d_soundfile.c pd-devel/src/d_soundfile.c
*** pd/src/d_soundfile.c	Tue Jul  8 11:48:57 2003
--- pd-devel/src/d_soundfile.c	Sun Feb 22 18:18:11 2004
***************
*** 540,546 ****
  	}
  	else if (!strcmp(flag, "little"))
  	{
! 	    endianness = 1;
  	    argc -= 1; argv += 1;
  	}
  	else if (!strcmp(flag, "r") || !strcmp(flag, "rate"))
--- 540,546 ----
  	}
  	else if (!strcmp(flag, "little"))
  	{
! 	    endianness = 0;
  	    argc -= 1; argv += 1;
  	}
  	else if (!strcmp(flag, "r") || !strcmp(flag, "rate"))
***************
*** 670,676 ****
      	wavehdr->w_samplespersec = swap4(samplerate, swap);
      	wavehdr->w_navgbytespersec =
  	    swap4((int)(samplerate * nchannels * bytespersamp), swap);
!     	wavehdr->w_nblockalign = swap2(bytespersamp, swap);
      	wavehdr->w_nbitspersample = swap2(8 * bytespersamp, swap);
      	strncpy(wavehdr->w_datachunkid, "data", 4);
      	wavehdr->w_datachunksize = swap4(datasize, swap);
--- 670,676 ----
      	wavehdr->w_samplespersec = swap4(samplerate, swap);
      	wavehdr->w_navgbytespersec =
  	    swap4((int)(samplerate * nchannels * bytespersamp), swap);
!     	wavehdr->w_nblockalign = swap2(nchannels * bytespersamp, swap);
      	wavehdr->w_nbitspersample = swap2(8 * bytespersamp, swap);
      	strncpy(wavehdr->w_datachunkid, "data", 4);
      	wavehdr->w_datachunksize = swap4(datasize, swap);
***************
*** 729,734 ****
--- 729,747 ----
      	    if (write(fd, (char *)(&mofo), 4) < 4)
      	    	goto baddonewrite;
  	}
+ 	if (filetype == FORMAT_NEXT)
+ 	{
+ 	    /* do it the lazy way: just set the size field to 'unknown size'*/
+ 	    uint32 nextsize = 0xffffffff;
+ 	    if (lseek(fd, 8, SEEK_SET) == 0)
+ 	    {
+ 	        goto baddonewrite;
+ 	    }
+ 	    if (write(fd, &nextsize, 4) < 4)
+ 	    {
+ 	        goto baddonewrite;
+ 	    }
+ 	}
      }
      return;
  baddonewrite:
Only in pd-devel/src/: delme
diff -rc pd/src/g_editor.c pd-devel/src/g_editor.c
*** pd/src/g_editor.c	Tue Nov 25 20:19:57 2003
--- pd-devel/src/g_editor.c	Sun Feb 22 18:18:21 2004
***************
*** 1471,1476 ****
--- 1471,1478 ----
  	SETSYMBOL(at+1, gotkeysym);
  	pd_list(keynamesym->s_thing, 0, 2, at);
      }
+     if (!x->gl_editor)	/* if that 'invis'ed the window, we'd better stop. */
+     	return;
      if (x && down)
      {
  	    /* if an object has "grabbed" keys just send them on */
Only in pd-devel/src/: g_editor.c.orig
diff -rc pd/src/g_mycanvas.c pd-devel/src/g_mycanvas.c
*** pd/src/g_mycanvas.c	Tue Nov 18 11:34:10 2003
--- pd-devel/src/g_mycanvas.c	Sun Feb 22 18:18:21 2004
***************
*** 298,304 ****
  	    message.  So we have to track its location separately (in
  	    the slot x_labelbindex) and initialize it specially here. */
      	iemgui_new_dogetname(&x->x_gui, i+3, argv);
! 	x->x_gui.x_labelbindex = i+3;
  	ldx = (int)atom_getintarg(i+4, argc, argv);
  	ldy = (int)atom_getintarg(i+5, argc, argv);
  	iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(i+6, argc, argv));
--- 298,304 ----
  	    message.  So we have to track its location separately (in
  	    the slot x_labelbindex) and initialize it specially here. */
      	iemgui_new_dogetname(&x->x_gui, i+3, argv);
! 	x->x_gui.x_labelbindex = i+4;
  	ldx = (int)atom_getintarg(i+4, argc, argv);
  	ldy = (int)atom_getintarg(i+5, argc, argv);
  	iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(i+6, argc, argv));
diff -rc pd/src/g_text.c pd-devel/src/g_text.c
*** pd/src/g_text.c	Fri Sep 12 22:55:31 2003
--- pd-devel/src/g_text.c	Sun Feb 22 18:18:21 2004
***************
*** 492,498 ****
      {
      	if (x->a_text.te_outlet)
      	    outlet_symbol(x->a_text.te_outlet, x->a_atom.a_w.w_symbol);
! 	if (*x->a_symto->s_name && x->a_symto->s_thing)
  	{
  	    if (x->a_symto == x->a_symfrom)
  	    	pd_error(x,
--- 492,498 ----
      {
      	if (x->a_text.te_outlet)
      	    outlet_symbol(x->a_text.te_outlet, x->a_atom.a_w.w_symbol);
! 	if (*x->a_symto->s_name && x->a_expanded_to->s_thing)
  	{
  	    if (x->a_symto == x->a_symfrom)
  	    	pd_error(x,
diff -rc pd/src/m_glob.c pd-devel/src/m_glob.c
*** pd/src/m_glob.c	Sun Feb 22 06:52:16 2004
--- pd-devel/src/m_glob.c	Sun Feb 22 18:23:06 2004
***************
*** 100,106 ****
      	gensym("path-dialog"), A_GIMME, 0);
      class_addmethod(glob_pdobject, (t_method)glob_tooltips,
      	gensym("tooltips"), A_DEFFLOAT, 0);
! #ifdef UNIX
      class_addmethod(glob_pdobject, (t_method)glob_ping, gensym("ping"), 0);
  #endif
      class_addanything(glob_pdobject, max_default);
--- 100,106 ----
      	gensym("path-dialog"), A_GIMME, 0);
      class_addmethod(glob_pdobject, (t_method)glob_tooltips,
      	gensym("tooltips"), A_DEFFLOAT, 0);
! #ifdef __linux__
      class_addmethod(glob_pdobject, (t_method)glob_ping, gensym("ping"), 0);
  #endif
      class_addanything(glob_pdobject, max_default);
Only in pd-devel/src/: m_glob.c.orig
diff -rc pd/src/m_sched.c pd-devel/src/m_sched.c
*** pd/src/m_sched.c	Wed Jan 14 16:50:28 2004
--- pd-devel/src/m_sched.c	Sun Feb 22 18:18:21 2004
***************
*** 265,271 ****
  
      	/* if there's no GUI but we're running in "realtime", here is
  	where we arrange to ping the watchdog every 2 seconds. */
! #ifdef UNIX
      if (sys_nogui && sys_hipriority && (sched_diddsp - sched_nextpingtime > 0))
      {
      	glob_ping(0);
--- 265,271 ----
  
      	/* if there's no GUI but we're running in "realtime", here is
  	where we arrange to ping the watchdog every 2 seconds. */
! #ifdef __linux__
      if (sys_nogui && sys_hipriority && (sched_diddsp - sched_nextpingtime > 0))
      {
      	glob_ping(0);
Only in pd-devel/src/: makefile
diff -rc pd/src/s_audio.c pd-devel/src/s_audio.c
*** pd/src/s_audio.c	Wed Jan 14 16:50:28 2004
--- pd-devel/src/s_audio.c	Sun Feb 22 18:24:40 2004
***************
*** 42,48 ****
--- 42,54 ----
      /* exported variables */
  int sys_schedadvance; 	/* scheduler advance in microseconds */
  float sys_dacsr;
+ 
+ #ifdef MACOSX
+ int sys_hipriority = 1;
+ #else
  int sys_hipriority = 0;
+ #endif
+ 
  t_sample *sys_soundout;
  t_sample *sys_soundin;
  
diff -rc pd/src/s_audio_alsa.c pd-devel/src/s_audio_alsa.c
*** pd/src/s_audio_alsa.c	Sun Feb 22 17:40:40 2004
--- pd-devel/src/s_audio_alsa.c	Sun Feb 22 18:28:06 2004
***************
*** 842,848 ****
      		return;
  	    }
  	    defect = indelay + outdelay - alsa_buf_samps;
! 	    if (defect < -DEFDACBLKSIZE)
      	    {
  		checkit = 1;
      		alsa_putzeros(1);
--- 842,848 ----
      		return;
  	    }
  	    defect = indelay + outdelay - alsa_buf_samps;
! 	    if (defect < -(3 * DEFDACBLKSIZE / 2) )
      	    {
  		checkit = 1;
      		alsa_putzeros(1);
***************
*** 860,869 ****
      }
  }
  
- void alsa_listdevs( void)
- {
-     post("device listing not implemented in ALSA yet\n");
- }
  
  static int alsa_nnames = 0;
  static char **alsa_names = 0;
--- 860,865 ----
diff -rc pd/src/s_audio_mmio.c pd-devel/src/s_audio_mmio.c
*** pd/src/s_audio_mmio.c	Fri Sep 12 23:02:15 2003
--- pd-devel/src/s_audio_mmio.c	Sun Feb 22 18:18:54 2004
***************
*** 32,38 ****
  #define MAXBUFFER 100   /* number of buffers in use at maximum advance */
  #define DEFBUFFER 30	/* default is about 30x6 = 180 msec! */
  static int nt_naudiobuffer = DEFBUFFER;
- 
  float sys_dacsr = DEFAULTSRATE;
  
  static int nt_whichapi = API_MMIO;
--- 32,37 ----
***************
*** 113,128 ****
      wh->reserved = 0;
  }
  
- static int nt_inalloc[NAPORTS], nt_outalloc[NAPORTS];
  static UINT nt_whichdac = WAVE_MAPPER, nt_whichadc = WAVE_MAPPER;
  
  int mmio_do_open_audio(void)
  { 
      PCMWAVEFORMAT  form; 
!     int i;
      UINT mmresult;
      int nad, nda;
! 
      if (sys_verbose)
      	post("%d devices in, %d devices out",
      	    nt_nwavein, nt_nwaveout);
--- 112,126 ----
      wh->reserved = 0;
  }
  
  static UINT nt_whichdac = WAVE_MAPPER, nt_whichadc = WAVE_MAPPER;
  
  int mmio_do_open_audio(void)
  { 
      PCMWAVEFORMAT  form; 
!     int i, j;
      UINT mmresult;
      int nad, nda;
!     static int naudioprepped = 0, nindevsprepped = 0, noutdevsprepped = 0;
      if (sys_verbose)
      	post("%d devices in, %d devices out",
      	    nt_nwavein, nt_nwaveout);
***************
*** 136,141 ****
--- 134,165 ----
  
      if (nt_nwavein <= 1 && nt_nwaveout <= 1)
      	nt_noresync();
+ 
+     if (nindevsprepped < nt_nwavein)
+     {
+     	for (i = nindevsprepped; i < nt_nwavein; i++)
+     	    for (j = 0; j < nt_naudiobuffer; j++)
+ 	    	wave_prep(&ntsnd_invec[i][j]);
+     	nindevsprepped = nt_nwavein;
+     }
+     if (noutdevsprepped < nt_nwaveout)
+     {
+     	for (i = noutdevsprepped; i < nt_nwaveout; i++)
+     	    for (j = 0; j < nt_naudiobuffer; j++)
+ 	    	wave_prep(&ntsnd_outvec[i][j]);
+     	noutdevsprepped = nt_nwaveout;
+     }
+     if (naudioprepped < nt_naudiobuffer)
+     {
+     	for (j = naudioprepped; j < nt_naudiobuffer; j++)
+ 	{
+     	    for (i = 0; i < nt_nwavein; i++)
+ 	    	wave_prep(&ntsnd_invec[i][j]);
+     	    for (i = 0; i < nt_nwaveout; i++)
+ 	    	wave_prep(&ntsnd_outvec[i][j]);
+     	}
+ 	naudioprepped = nt_naudiobuffer;
+     }
      for (nad=0; nad < nt_nwavein; nad++)
      {
  	/* Open waveform device(s), sucessively numbered, for input */
***************
*** 154,165 ****
  	} 
  	else 
  	{
- 	    if (!nt_inalloc[nad])
- 	    {
- 		for (i = 0; i < nt_naudiobuffer; i++)
- 	    	    wave_prep(&ntsnd_invec[nad][i]);
- 		nt_inalloc[nad] = 1;
- 	    }
  	    for (i = 0; i < nt_naudiobuffer; i++)
  	    {
  		mmresult = waveInPrepareHeader(ntsnd_indev[nad],
--- 178,183 ----
***************
*** 174,185 ****
  	}
      }
      	/* quickly start them all together */
!     for(nad=0; nad < nt_nwavein; nad++)
      	waveInStart(ntsnd_indev[nad]);
  
!     for(nda=0; nda < nt_nwaveout; nda++)
!     {
!     	
      	    /* Open a waveform device for output in sucessiv device numbering*/
      	mmresult = waveOutOpen(&ntsnd_outdev[nda], nt_whichdac + nda,
      	    (WAVEFORMATEX *)(&form), 0L, 0L, CALLBACK_NULL);
--- 192,202 ----
  	}
      }
      	/* quickly start them all together */
!     for (nad = 0; nad < nt_nwavein; nad++)
      	waveInStart(ntsnd_indev[nad]);
  
!     for (nda = 0; nda < nt_nwaveout; nda++)
!     {	
      	    /* Open a waveform device for output in sucessiv device numbering*/
      	mmresult = waveOutOpen(&ntsnd_outdev[nda], nt_whichdac + nda,
      	    (WAVEFORMATEX *)(&form), 0L, 0L, CALLBACK_NULL);
***************
*** 194,212 ****
              nt_waveouterror("waveOutOpen device: %s\n",  mmresult);
              nt_nwaveout = nda;
      	}
- 	else
- 	{
- 	    if (!(nt_outalloc[nda]))
- 	    {
- 	    	for (i = 0; i < nt_naudiobuffer; i++)
- 	    	{
-     	    	    wave_prep(&ntsnd_outvec[nda][i]);
- 	    	    	    /* set DONE flag as if we had queued them */
-     	    	    ntsnd_outvec[nda][i].lpWaveHdr->dwFlags = WHDR_DONE;
-     	    	}
-     	    	nt_outalloc[nda] = 1;
- 	    }
-     	}
      }
  
      return (0);
--- 211,216 ----
diff -rc pd/src/s_inter.c pd-devel/src/s_inter.c
*** pd/src/s_inter.c	Wed Jan 21 20:53:04 2004
--- pd-devel/src/s_inter.c	Sun Feb 22 18:19:06 2004
***************
*** 529,534 ****
--- 529,535 ----
  
  static int sys_watchfd;
  
+ #ifdef __linux__
  void glob_ping(t_pd *dummy)
  {
      if (write(sys_watchfd, "\n", 1) < 1)
***************
*** 537,542 ****
--- 538,544 ----
  	sys_bail(1);
      }
  }
+ #endif
  
  static int defaultfontshit[] = {
      8, 5, 9, 10, 6, 10, 12, 7, 13, 14, 9, 17, 16, 10, 19, 24, 15, 28,
***************
*** 635,641 ****
  	intarg = 1;
  	if (setsockopt(xsock, IPPROTO_TCP, TCP_NODELAY,
      	    &intarg, sizeof(intarg)) < 0)
!     		post("setsockopt (TCP_NODELAY) failed\n");
  	
  	
  	server.sin_family = AF_INET;
--- 637,646 ----
  	intarg = 1;
  	if (setsockopt(xsock, IPPROTO_TCP, TCP_NODELAY,
      	    &intarg, sizeof(intarg)) < 0)
! #ifndef MSW
!     		post("setsockopt (TCP_NODELAY) failed\n")
! #endif
!     	    	    ;
  	
  	
  	server.sin_family = AF_INET;
***************
*** 742,748 ****
  #ifdef MSW
      	    /* in MSW land "guipath" is unused; we just do everything from
  	    the libdir. */
!     	fprintf(stderr, "%s\n", sys_libdir->s_name);
      	
      	strcpy(scriptbuf, "\"");
      	strcat(scriptbuf, sys_libdir->s_name);
--- 747,753 ----
  #ifdef MSW
      	    /* in MSW land "guipath" is unused; we just do everything from
  	    the libdir. */
!     	/* fprintf(stderr, "%s\n", sys_libdir->s_name); */
      	
      	strcpy(scriptbuf, "\"");
      	strcat(scriptbuf, sys_libdir->s_name);
***************
*** 841,846 ****
--- 846,852 ----
          fprintf(stderr, "pd: couldn't set high priority class\n");
  #endif
  #ifdef MACOSX
+     if (sys_hipriority)
      {
  	struct sched_param param;
  	int policy = SCHED_RR;
***************
*** 872,879 ****
--- 878,887 ----
      	    fprintf(stderr, "... connected\n");
  
  	    /* here is where we start the pinging. */
+ #ifdef __linux__
  	if (sys_hipriority)
      	    sys_gui("pdtk_watchdog\n");
+ #endif
      	sys_get_audio_apis(buf);
  	sys_vgui("pdtk_pd_startup {%s} %s\n", pd_version, buf); 
      }
diff -rc pd/src/s_main.c pd-devel/src/s_main.c
*** pd/src/s_main.c	Sat Feb 21 23:05:20 2004
--- pd-devel/src/s_main.c	Sun Feb 22 18:19:06 2004
***************
*** 232,239 ****
      sys_oldtclversion = atom_getfloatarg(1 + 3 * NHOSTFONT, argc, argv);
  }
  
! static void sys_addextrapath(void);
! static void sys_addreferencepath(void);
  
  /* this is called from main() in s_entry.c */
  int sys_main(int argc, char **argv)
--- 232,238 ----
      sys_oldtclversion = atom_getfloatarg(1 + 3 * NHOSTFONT, argc, argv);
  }
  
! static void sys_afterargparse(void);
  
  /* this is called from main() in s_entry.c */
  int sys_main(int argc, char **argv)
***************
*** 247,255 ****
  #ifdef UNIX
      sys_rcfile();                               /* parse the startup file */
  #endif
!     if (sys_argparse(argc, argv)) return (1);	/* parse cmd line */
!     sys_addextrapath();
!     sys_addreferencepath();
      if (sys_verbose || sys_version) fprintf(stderr, "%scompiled %s %s\n",
      	pd_version, pd_compiletime, pd_compiledate);
      if (sys_version)	/* if we were just asked our version, exit here. */
--- 246,254 ----
  #ifdef UNIX
      sys_rcfile();                               /* parse the startup file */
  #endif
!     if (sys_argparse(argc, argv))   	    /* parse cmd line */
!     	return (1);
!     sys_afterargparse();    	    	    /* post-argparse settings */
      if (sys_verbose || sys_version) fprintf(stderr, "%scompiled %s %s\n",
      	pd_version, pd_compiletime, pd_compiledate);
      if (sys_version)	/* if we were just asked our version, exit here. */
***************
*** 354,361 ****
  "-nogui           -- suppress starting the GUI\n",
  "-guicmd \"cmd...\" -- substitute another GUI program (e.g., rsh)\n",
  "-send \"msg...\"   -- send a message at startup (after patches are loaded)\n",
! #ifdef __linux__
! "-rt or -realtime -- use real-time priority (needs root privilege)\n",
  #endif
  };
  
--- 353,361 ----
  "-nogui           -- suppress starting the GUI\n",
  "-guicmd \"cmd...\" -- substitute another GUI program (e.g., rsh)\n",
  "-send \"msg...\"   -- send a message at startup (after patches are loaded)\n",
! #ifdef UNIX
! "-rt or -realtime -- use real-time priority\n",
! "-nrt             -- don't use real-time priority\n",
  #endif
  };
  
***************
*** 484,498 ****
  #endif
  }
  
  int sys_argparse(int argc, char **argv)
  {
      char sbuf[MAXPDSTRING];
      int i;
- #ifdef MSW
-     int mmio = 1;
- #else
-     int mmio = 0;
- #endif
      argc--; argv++;
      while ((argc > 0) && **argv == '-')
      {
--- 484,499 ----
  #endif
  }
  
+ #ifdef MSW
+ static int sys_mmio = 1;
+ #else
+ static int sys_mmio = 0;
+ #endif
+ 
  int sys_argparse(int argc, char **argv)
  {
      char sbuf[MAXPDSTRING];
      int i;
      argc--; argv++;
      while ((argc > 0) && **argv == '-')
      {
***************
*** 619,625 ****
  	    )
      	{
      	    sys_set_audio_api(API_PORTAUDIO);
! 	    mmio = 0;
      	    argc--; argv++;
      	}
  #endif
--- 620,626 ----
  	    )
      	{
      	    sys_set_audio_api(API_PORTAUDIO);
! 	    sys_mmio = 0;
      	    argc--; argv++;
      	}
  #endif
***************
*** 627,633 ****
      	else if (!strcmp(*argv, "-mmio"))
      	{
      	    sys_set_audio_api(API_MMIO);
! 	    mmio = 1;
      	    argc--; argv++;
      	}
  #endif
--- 628,634 ----
      	else if (!strcmp(*argv, "-mmio"))
      	{
      	    sys_set_audio_api(API_MMIO);
! 	    sys_mmio = 1;
      	    argc--; argv++;
      	}
  #endif
***************
*** 745,750 ****
--- 746,756 ----
      	    sys_hipriority = 1;
      	    argc--; argv++;
      	}
+     	else if (!strcmp(*argv, "-nrt"))
+     	{
+     	    sys_hipriority = 0;
+     	    argc--; argv++;
+     	}
  #endif
      	else if (!strcmp(*argv, "-soundindev") ||
  	    !strcmp(*argv, "-audioindev"))
***************
*** 801,821 ****
      for (; argc > 0; argc--, argv++) 
      	sys_openlist = namelist_append(sys_openlist, *argv);
  
-     	/* correct to make audio and MIDI device lists zero based.  On
- 	MMIO, however, "1" really means the second device (the first one
- 	is "mapper" which is was not included when the command args were
- 	set up, so we leave it that way for compatibility. */
-     if (!mmio)
-     {
-     	for (i = 0; i < sys_nsoundin; i++)
-     	    sys_soundindevlist[i]--;
-     	for (i = 0; i < sys_nsoundout; i++)
-     	    sys_soundoutdevlist[i]--;
-     }
-     for (i = 0; i < sys_nmidiin; i++)
-     	sys_midiindevlist[i]--;
-     for (i = 0; i < sys_nmidiout; i++)
-     	sys_midioutdevlist[i]--;
  
      return (0);
  }
--- 807,812 ----
***************
*** 825,846 ****
      return (DEFDACBLKSIZE);
  }
  
! static void sys_addextrapath(void)
  {
      char sbuf[MAXPDSTRING];
  	    /* add "extra" library to path */
      strncpy(sbuf, sys_libdir->s_name, MAXPDSTRING-30);
      sbuf[MAXPDSTRING-30] = 0;
      strcat(sbuf, "/extra");
      sys_addpath(sbuf);
- }
- 
- static void sys_addreferencepath(void)
- {
-     char sbuf[MAXPDSTRING];
  	    /* add "doc/5.reference" library to helppath */
      strncpy(sbuf, sys_libdir->s_name, MAXPDSTRING-30);
      sbuf[MAXPDSTRING-30] = 0;
      strcat(sbuf, "/doc/5.reference");
      sys_addhelppath(sbuf);
  }
--- 816,855 ----
      return (DEFDACBLKSIZE);
  }
  
!     /* stuff to do, once, after calling sys_argparse() -- which may itself
!     be called twice because of the .pdrc hack. */
! static void sys_afterargparse(void)
  {
      char sbuf[MAXPDSTRING];
+     int i;
  	    /* add "extra" library to path */
      strncpy(sbuf, sys_libdir->s_name, MAXPDSTRING-30);
      sbuf[MAXPDSTRING-30] = 0;
      strcat(sbuf, "/extra");
      sys_addpath(sbuf);
  	    /* add "doc/5.reference" library to helppath */
      strncpy(sbuf, sys_libdir->s_name, MAXPDSTRING-30);
      sbuf[MAXPDSTRING-30] = 0;
      strcat(sbuf, "/doc/5.reference");
      sys_addhelppath(sbuf);
+     	/* correct to make audio and MIDI device lists zero based.  On
+ 	MMIO, however, "1" really means the second device (the first one
+ 	is "mapper" which is was not included when the command args were
+ 	set up, so we leave it that way for compatibility. */
+     if (!sys_mmio)
+     {
+     	for (i = 0; i < sys_nsoundin; i++)
+     	    sys_soundindevlist[i]--;
+     	for (i = 0; i < sys_nsoundout; i++)
+     	    sys_soundoutdevlist[i]--;
+     }
+     for (i = 0; i < sys_nmidiin; i++)
+     	sys_midiindevlist[i]--;
+     for (i = 0; i < sys_nmidiout; i++)
+     	sys_midioutdevlist[i]--;
+ }
+ 
+ static void sys_addreferencepath(void)
+ {
+     char sbuf[MAXPDSTRING];
  }
Only in pd-devel/src/: s_main.c.orig


More information about the Pd-dev mailing list