[Gridflow-cvs] [svn] commit: r6091 - in /trunk/src: formats.cxx grid.cxx gridflow.cxx mpeg3.cxx quicktimeapple.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sat Aug 14 18:22:15 EDT 2010


Author: matju
Date: Sat Aug 14 18:22:14 2010
New Revision: 6091

Log:
use shortcuts

Modified:
    trunk/src/formats.cxx
    trunk/src/grid.cxx
    trunk/src/gridflow.cxx
    trunk/src/mpeg3.cxx
    trunk/src/quicktimeapple.cxx

Modified: trunk/src/formats.cxx
==============================================================================
--- trunk/src/formats.cxx (original)
+++ trunk/src/formats.cxx Sat Aug 14 18:22:14 2010
@@ -186,13 +186,13 @@
 \def 0 bang () {
 	//post("#io.grid 0 bang: ftell=%ld",ftell(f));
 	Dim dim;
-	if (feof(f)) {outlet_bang(bself->te_outlet); return;}
+	if (feof(f)) {out[0](); return;}
 	//post("#in grid bang: offset %ld",ftell(f));
 	if (headerless) {
 		dim = this->dim;
 	} else {
 		int r = fread(&head,1,8,f);
-		if (feof(f)) {outlet_bang(bself->te_outlet); return;} /* damn */
+		if (feof(f)) {out[0](); return;} /* damn */
 		if (r<8) RAISE("can't read header: got %d bytes instead of 8",r);
 		uint8 *m = (uint8 *)head.magic;
 		if (strncmp((char *)m,"\x7fgrid",5)==0) endian=1; else

Modified: trunk/src/grid.cxx
==============================================================================
--- trunk/src/grid.cxx (original)
+++ trunk/src/grid.cxx Sat Aug 14 18:22:14 2010
@@ -188,7 +188,7 @@
 
 GridOut::GridOut(FObject *parent_, int woutlet, const Dim &dim_, NumberTypeE nt_) {
 	parent=parent_; dim=dim_; nt=nt_; dex=0; bufi=0; sender=this; fresh=true;
-	if (parent) {t_atom2 a[1] = {this}; outlet_anything(parent->out[woutlet],s_grid,1,a); if (!dim.prod()) finish();}
+	if (parent) {t_atom2 a[1] = {this}; parent->out[woutlet](s_grid,1,a); if (!dim.prod()) finish();}
 }
 
 void GridOut::create_buf () {

Modified: trunk/src/gridflow.cxx
==============================================================================
--- trunk/src/gridflow.cxx (original)
+++ trunk/src/gridflow.cxx Sat Aug 14 18:22:14 2010
@@ -200,16 +200,16 @@
 
 // adapted from desiredata/src/kernel.c
 void PtrOutlet::operator () (t_atom *a) {
-    if      (a->a_type==A_FLOAT  ) outlet_float(  p,a->a_float);
-    else if (a->a_type==A_SYMBOL ) outlet_symbol( p,a->a_symbol);
-    else if (a->a_type==A_POINTER) outlet_pointer(p,a->a_gpointer);
+    if      (a->a_type==A_FLOAT  ) (*this)(a->a_float);
+    else if (a->a_type==A_SYMBOL ) (*this)(a->a_symbol);
+    else if (a->a_type==A_POINTER) (*this)(a->a_gpointer);
     else error("can't send atom whose type is %d",a->a_type);
 }
-void outlet_atom2 (t_outlet *self, t_atom *av) {
-	if (av->a_type==A_FLOAT)   outlet_float(  self,av->a_float);    else
-	if (av->a_type==A_SYMBOL)  outlet_symbol( self,av->a_symbol);   else
-	if (av->a_type==A_POINTER) outlet_pointer(self,av->a_gpointer); else
-	outlet_list(self,gensym("list"),1,av);
+void outlet_atom2 (PtrOutlet self, t_atom *av) {
+	if (av->a_type==A_FLOAT)   self(av->a_float);    else
+	if (av->a_type==A_SYMBOL)  self(av->a_symbol);   else
+	if (av->a_type==A_POINTER) self(av->a_gpointer); else
+	self(1,av);
 }
 
 //----------------------------------------------------------------

Modified: trunk/src/mpeg3.cxx
==============================================================================
--- trunk/src/mpeg3.cxx (original)
+++ trunk/src/mpeg3.cxx Sat Aug 14 18:22:14 2010
@@ -54,7 +54,7 @@
 	int nframe = mpeg3_get_frame(mpeg,track);
 	int nframes = mpeg3_video_frames(mpeg,track);
 	//post("track=%d; nframe=%d; nframes=%d",track,nframe,nframes);
-	if (nframe >= nframes) {outlet_bang(bself->te_outlet); return;}
+	if (nframe >= nframes) {out[0](); return;}
 	int sx = mpeg3_video_width(mpeg,track);
 	int sy = mpeg3_video_height(mpeg,track);
 	int channels = 3;

Modified: trunk/src/quicktimeapple.cxx
==============================================================================
--- trunk/src/quicktimeapple.cxx (original)
+++ trunk/src/quicktimeapple.cxx Sat Aug 14 18:22:14 2010
@@ -175,14 +175,14 @@
 	GetMovieBox(movie,&r);
 	PixMapHandle pixmap = GetGWorldPixMap(gw);
 	short flags = nextTimeStep;
-	if (nframe>=nframes) {outlet_bang(bself->te_outlet); return;}
+	if (nframe>=nframes) {out[0](); return;}
 	if (nframe==0) flags |= nextTimeEdgeOK;
 	TimeValue duration;
 	OSType mediaType = VisualMediaCharacteristic;
 	GetMovieNextInterestingTime(movie,flags,1,&mediaType,time,0,&time,&duration);
 	if (time<0) {
 		time=0;
-		outlet_bang(bself->te_outlet);
+		out[0]();
 		return;
 	}
 //	post("quicktime frame #%d; time=%d duration=%d", nframe, (long)time, (long)duration);



More information about the Gridflow-cvs mailing list