[PD-cvs] pd/src d_soundfile.c,1.4.4.8,1.4.4.9

Tim Blechmann timblech at users.sourceforge.net
Tue Dec 14 10:29:56 CET 2004


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

Modified Files:
      Tag: devel_0_38
	d_soundfile.c 
Log Message:
some fixes for the threaded soundfiler


Index: d_soundfile.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v
retrieving revision 1.4.4.8
retrieving revision 1.4.4.9
diff -C2 -d -r1.4.4.8 -r1.4.4.9
*** d_soundfile.c	2 Dec 2004 15:22:33 -0000	1.4.4.8
--- d_soundfile.c	14 Dec 2004 09:29:54 -0000	1.4.4.9
***************
*** 1376,1380 ****
  	for (i = 0; i < argc; i++)
  	{
! 		t_int w[4];
  		
  		w[0] = (t_int)(garrays[i]);
--- 1376,1380 ----
  	for (i = 0; i < argc; i++)
  	{
! 		t_int* w = (t_int*)getbytes(4*sizeof(t_int));
  		
  		w[0] = (t_int)(garrays[i]);
***************
*** 1382,1387 ****
  		w[2] = (t_int)finalsize;
  		w[3] = (t_int)(&resume_after_callback);
! 
  		set_callback(&soundfiler_read_update_garray, w, 4);
  		pthread_cond_wait(&resume_after_callback, &resume_after_callback_mutex);
  	}
--- 1382,1388 ----
  		w[2] = (t_int)finalsize;
  		w[3] = (t_int)(&resume_after_callback);
! 		
  		set_callback(&soundfiler_read_update_garray, w, 4);
+ 
  		pthread_cond_wait(&resume_after_callback, &resume_after_callback_mutex);
  	}
***************
*** 1471,1474 ****
--- 1472,1479 ----
  	   reset the graph's coordinates */
  
+ #ifdef SFDEBUG
+ 	post("redraw array %p", garray);
+ #endif
+ 
  	gl = garray->x_glist;
  	if (gl->gl_list == &garray->x_gobj && !garray->x_gobj.g_next)
***************
*** 1482,1486 ****
  		garray_redraw(garray);
  
- /* 	freebytes(w, 2*sizeof(t_int)); */
  	return 0;
  }
--- 1487,1490 ----
***************
*** 1491,1498 ****
  	t_outlet* outlet = (t_outlet*) w[0];
  	float itemsread = (float) w[1];
  	
  	outlet_float (outlet, itemsread);
  
- /* 	freebytes(w, 2*sizeof(t_int)); */
  	return 0;
  }
--- 1495,1506 ----
  	t_outlet* outlet = (t_outlet*) w[0];
  	float itemsread = (float) w[1];
+ 
+ 
+ #ifdef SFDEBUG
+ 	post("bang %p", outlet);
+ #endif
  	
  	outlet_float (outlet, itemsread);
  
  	return 0;
  }





More information about the Pd-cvs mailing list