[PD-cvs] externals/grill/flext/source flbase.cpp, 1.24, 1.25 flbuf.cpp, 1.25, 1.26 fldsp.h, 1.15, 1.16 flext.cpp, 1.38, 1.39 flmsg.cpp, 1.18, 1.19 flsndobj.cpp, 1.9, 1.10 flsndobj.h, 1.8, 1.9 flstk.cpp, 1.6, 1.7 flstk.h, 1.7, 1.8 flsupport.h, 1.96, 1.97

Thomas Grill xovo at users.sourceforge.net
Mon Sep 12 12:27:43 CEST 2005


Update of /cvsroot/pure-data/externals/grill/flext/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22978/source

Modified Files:
	flbase.cpp flbuf.cpp fldsp.h flext.cpp flmsg.cpp flsndobj.cpp 
	flsndobj.h flstk.cpp flstk.h flsupport.h 
Log Message:
changed initialization functions accordingly
minimal additions for buffers and exception handling
change click modifier to shift (seems to work)
small fixes for tutorial examples
added flfeatures.h for compile-time version-specific feature detection
added typed flext::NewAligned
fixed severe Altivec bug
adapted for pd-devel 0.39
- better handling of click callback
slimmed object data structures
update DSP methods for SndObj and STK classes
- more compatible handling of attributes in patcher (hiding is now an option - define FLEXT_ATTRHIDE)
better buffer checking


Index: fldsp.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/fldsp.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** fldsp.h	23 May 2005 16:52:44 -0000	1.15
--- fldsp.h	12 Sep 2005 10:27:40 -0000	1.16
***************
*** 55,61 ****
--- 55,67 ----
      t_sample *const *InSig() const { return invecs; }
  
+ 	//! returns input vector
+     t_sample *InSig(int i) const { return invecs[i]; }
+ 
  	//! returns array of output vectors (CntOutSig() vectors)
      t_sample *const *OutSig() const { return outvecs; }
  
+ 	//! returns output vector
+     t_sample *OutSig(int i) const { return outvecs[i]; }
+ 
  	//! typedef describing a signal vector
  #if FLEXT_SYS == FLEXT_SYS_JMAX

Index: flsupport.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.h,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -d -r1.96 -r1.97
*** flsupport.h	30 Aug 2005 10:54:36 -0000	1.96
--- flsupport.h	12 Sep 2005 10:27:40 -0000	1.97
***************
*** 201,205 ****
              \note This must be true to use any of the other functions except set
  		*/
! 		bool Ok() const { return sym && data; }
  		
  		/*! \brief Check if buffer content is valid (not in state of content change)
--- 201,212 ----
              \note This must be true to use any of the other functions except set
  		*/
! 		bool Ok() const 
! 		{ 
! 			return sym  
! #if FLEXT_SYS == FLEXT_SYS_PD
! 				&& arr
! #endif
! 				&& data; 
! 		}
  		
  		/*! \brief Check if buffer content is valid (not in state of content change)

Index: flstk.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flstk.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** flstk.cpp	26 Jan 2005 05:02:03 -0000	1.6
--- flstk.cpp	12 Sep 2005 10:27:40 -0000	1.7
***************
*** 46,50 ****
  }
  
! void flext_stk::m_dsp(int n,t_sample *const *in,t_sample *const *out)
  {
      // called on every rebuild of the dsp chain
--- 46,50 ----
  }
  
! bool flext_stk::CbDsp()
  {
      // called on every rebuild of the dsp chain
***************
*** 65,74 ****
              inobj = new Input *[inobjs];
              for(i = 0; i < inobjs; ++i)
!                 inobj[i] = new Input(in[i],blsz);
          }
          if(outobjs) {
              outobj = new Output *[outobjs];
              for(i = 0; i < outobjs; ++i) 
!                 outobj[i] = new Output(out[i],blsz);
          }
  
--- 65,74 ----
              inobj = new Input *[inobjs];
              for(i = 0; i < inobjs; ++i)
!                 inobj[i] = new Input(InSig(i),blsz);
          }
          if(outobjs) {
              outobj = new Output *[outobjs];
              for(i = 0; i < outobjs; ++i) 
!                 outobj[i] = new Output(OutSig(i),blsz);
          }
  
***************
*** 78,87 ****
          // assign changed input/output vectors
  
!         for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(in[i]);
!         for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(out[i]);
      }
  }
  
! void flext_stk::m_signal(int n,t_sample *const *in,t_sample *const *out)
  {
      if(inobjs || outobjs) ProcessObjs(blsz);
--- 78,88 ----
          // assign changed input/output vectors
  
!         for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(InSig(i));
!         for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(OutSig(i));
      }
+     return true;
  }
  
! void flext_stk::CbSignal()
  {
      if(inobjs || outobjs) ProcessObjs(blsz);

Index: flext.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flext.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** flext.cpp	30 Jul 2005 21:59:43 -0000	1.38
--- flext.cpp	12 Sep 2005 10:27:40 -0000	1.39
***************
*** 176,180 ****
  void flext_base::cb_click(t_gobj *c,t_floatarg xpos,t_floatarg ypos,t_floatarg shift,t_floatarg ctrl,t_floatarg alt)
  {
!     if(alt) thisObject(c)->CbClick();
  }
  #endif
--- 176,180 ----
  void flext_base::cb_click(t_gobj *c,t_floatarg xpos,t_floatarg ypos,t_floatarg shift,t_floatarg ctrl,t_floatarg alt)
  {
!     if(shift) thisObject(c)->CbClick();
  }
  #endif

Index: flmsg.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flmsg.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** flmsg.cpp	19 Jul 2005 13:17:50 -0000	1.18
--- flmsg.cpp	12 Sep 2005 10:27:40 -0000	1.19
***************
*** 254,263 ****
--- 254,266 ----
      catch(std::exception &x) {
          error("%s - Exception while processing method: %s",thisName(),x.what());
+         ret = false;
      }
      catch(const char *txt) {
      	error("%s - Exception while processing method: %s",thisName(),txt);
+         ret = false;
      }
      catch(...) {
      	error("%s - Unknown exception while processing method",thisName());
+         ret = false;
      }
  

Index: flbase.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flbase.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** flbase.cpp	30 Jul 2005 12:21:41 -0000	1.24
--- flbase.cpp	12 Sep 2005 10:27:40 -0000	1.25
***************
*** 26,29 ****
--- 26,30 ----
      #pragma warning (disable:4091)
  #endif
+ // for canvas_realizedollar (should be noon-critical)
  #include <g_canvas.h>
  #ifdef _MSC_VER

Index: flsndobj.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsndobj.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** flsndobj.h	26 Jan 2005 05:02:03 -0000	1.8
--- flsndobj.h	12 Sep 2005 10:27:40 -0000	1.9
***************
*** 42,48 ****
      virtual void Exit();
  
-     virtual void m_dsp(int n,t_sample *const *in,t_sample *const *out); 
-     virtual void m_signal(int n,t_sample *const *in,t_sample *const *out); 
- 
  private:
      //! SndObj for reading from inlet buffer
--- 42,45 ----
***************
*** 76,79 ****
--- 73,79 ----
      };
  
+     virtual bool CbDsp(); 
+     virtual void CbSignal(); 
+ 
      void ClearObjs();
  

Index: flstk.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flstk.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** flstk.h	26 Jan 2005 05:02:03 -0000	1.7
--- flstk.h	12 Sep 2005 10:27:40 -0000	1.8
***************
*** 80,85 ****
  
  private:
!     virtual void m_dsp(int n,t_sample *const *in,t_sample *const *out); 
!     virtual void m_signal(int n,t_sample *const *in,t_sample *const *out); 
  
      void ClearObjs();
--- 80,85 ----
  
  private:
!     virtual bool CbDsp(); 
!     virtual void CbSignal(); 
  
      void ClearObjs();

Index: flbuf.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flbuf.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** flbuf.cpp	22 Aug 2005 19:20:27 -0000	1.25
--- flbuf.cpp	12 Sep 2005 10:27:40 -0000	1.26
***************
*** 327,335 ****
  bool flext::buffer::IsDirty() const
  {
!     FLEXT_ASSERT(sym);
  #if FLEXT_SYS == FLEXT_SYS_PD
-     FLEXT_ASSERT(arr);
      #ifdef _FLEXT_HAVE_PD_GARRAYUPDATETIME
!     return isdirty || garray_updatetime(arr) > cleantime;
      #else
      // Don't know.... (no method in PD judging whether buffer has been changed from outside flext...)
--- 327,334 ----
  bool flext::buffer::IsDirty() const
  {
!     if(!sym) return false;
  #if FLEXT_SYS == FLEXT_SYS_PD
      #ifdef _FLEXT_HAVE_PD_GARRAYUPDATETIME
!     return arr && (isdirty || garray_updatetime(arr) > cleantime);
      #else
      // Don't know.... (no method in PD judging whether buffer has been changed from outside flext...)

Index: flsndobj.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsndobj.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** flsndobj.cpp	26 Jan 2005 05:02:02 -0000	1.9
--- flsndobj.cpp	12 Sep 2005 10:27:40 -0000	1.10
***************
*** 51,55 ****
  }
  
! void flext_sndobj::m_dsp(int n,t_sample *const *in,t_sample *const *out)
  {
      // called on every rebuild of the dsp chain
--- 51,55 ----
  }
  
! bool flext_sndobj::CbDsp()
  {
      // called on every rebuild of the dsp chain
***************
*** 69,73 ****
              tmpobj = new SndObj *[inobjs];
              for(i = 0; i < inobjs; ++i) {
!                 inobj[i] = new Inlet(in[i],blsz,smprt);
                  tmpobj[i] = new SndObj(NULL,blsz,smprt);
              }
--- 69,73 ----
              tmpobj = new SndObj *[inobjs];
              for(i = 0; i < inobjs; ++i) {
!                 inobj[i] = new Inlet(InSig(i),blsz,smprt);
                  tmpobj[i] = new SndObj(NULL,blsz,smprt);
              }
***************
*** 75,79 ****
          if(outobjs) {
              outobj = new Outlet *[outobjs];
!             for(i = 0; i < outobjs; ++i) outobj[i] = new Outlet(out[i],blsz,smprt);
          }
  
--- 75,79 ----
          if(outobjs) {
              outobj = new Outlet *[outobjs];
!             for(i = 0; i < outobjs; ++i) outobj[i] = new Outlet(OutSig(i),blsz,smprt);
          }
  
***************
*** 83,92 ****
          // assign changed input/output vectors
  
!         for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(in[i]);
!         for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(out[i]);
      }
  }
  
! void flext_sndobj::m_signal(int n,t_sample *const *in,t_sample *const *out)
  {
      for(int i = 0; i < inobjs; ++i) *tmpobj[i] << *inobj[i];
--- 83,93 ----
          // assign changed input/output vectors
  
!         for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(InSig(i));
!         for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(OutSig(i));
      }
+     return true;
  }
  
! void flext_sndobj::CbSignal()
  {
      for(int i = 0; i < inobjs; ++i) *tmpobj[i] << *inobj[i];





More information about the Pd-cvs mailing list