[PD-cvs] externals/grill/xsample/source groove.cpp, 1.36, 1.37 inter.cpp, 1.9, 1.10 inter.h, 1.9, 1.10 main.cpp, 1.23, 1.24 main.h, 1.41, 1.42 play.cpp, 1.11, 1.12 record.cpp, 1.19, 1.20

Thomas Grill xovo at users.sourceforge.net
Thu Nov 2 01:27:25 CET 2006


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

Modified Files:
	groove.cpp inter.cpp inter.h main.cpp main.h play.cpp 
	record.cpp 
Log Message:
use branch hints
small fixes
update for new flext callback naming
updated docs


Index: main.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/xsample/source/main.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** main.cpp	19 Nov 2005 23:15:44 -0000	1.23
--- main.cpp	2 Nov 2006 00:27:23 -0000	1.24
***************
*** 2,6 ****
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2005 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
--- 2,6 ----
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2006 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
***************
*** 17,21 ****
      flext::post("");
  	flext::post("  xrecord~, xplay~, xgroove~   ");
!     flext::post("  (C)2001-2005 Thomas Grill    ");
  #ifdef FLEXT_DEBUG
      flext::post("");
--- 17,21 ----
      flext::post("");
  	flext::post("  xrecord~, xplay~, xgroove~   ");
!     flext::post("  (C)2001-2006 Thomas Grill    ");
  #ifdef FLEXT_DEBUG
      flext::post("");
***************
*** 75,79 ****
      if(!buf.Ok()) return 0;
      
!     if(buf.Update()) {
  #ifdef FLEXT_DEBUG
          post("%s - buffer update!",thisName());
--- 75,79 ----
      if(!buf.Ok()) return 0;
      
!     if(UNLIKELY(buf.Update())) {
  #ifdef FLEXT_DEBUG
          post("%s - buffer update!",thisName());
***************
*** 101,105 ****
  	const t_symbol *sym = argc >= 1?GetASymbol(argv[0]):NULL;
  	int r = buf.Set(sym);
! 	if(sym && r < 0) 
          post("%s - can't find buffer %s",thisName(),GetString(sym));
      Update(xsc_buffer,true);
--- 101,105 ----
  	const t_symbol *sym = argc >= 1?GetASymbol(argv[0]):NULL;
  	int r = buf.Set(sym);
! 	if(LIKELY(sym) && UNLIKELY(r < 0)) 
          post("%s - can't find buffer %s",thisName(),GetString(sym));
      Update(xsc_buffer,true);
***************
*** 110,119 ****
      int ret = ChkBuffer(true);
  
! 	if(ret && s2u) {
  		long cmn = CASTINT<long>(mn/s2u+0.5f);  // conversion to samples
  
! 		if(cmn < 0) 
              curmin = 0;
! 		else if(cmn > curmax) 
              curmin = curmax;
  		else
--- 110,119 ----
      int ret = ChkBuffer(true);
  
! 	if(LIKELY(ret) && LIKELY(s2u)) {
  		long cmn = CASTINT<long>(mn/s2u+0.5f);  // conversion to samples
  
! 		if(UNLIKELY(cmn < 0)) 
              curmin = 0;
! 		else if(UNLIKELY(cmn > curmax))
              curmin = curmax;
  		else
***************
*** 128,137 ****
      int ret = ChkBuffer(true);
  
! 	if(ret && s2u) {
  		long cmx = CASTINT<long>(mx/s2u+0.5f);  // conversion to samples
  
! 		if(cmx > buf.Frames()) 
              curmax = buf.Frames();
! 		else if(cmx < curmin) 
              curmax = curmin;
          else
--- 128,137 ----
      int ret = ChkBuffer(true);
  
! 	if(LIKELY(ret) && LIKELY(s2u)) {
  		long cmx = CASTINT<long>(mx/s2u+0.5f);  // conversion to samples
  
! 		if(UNLIKELY(cmx > buf.Frames())) 
              curmax = buf.Frames();
! 		else if(UNLIKELY(cmx < curmin)) 
              curmax = curmin;
          else

Index: play.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/xsample/source/play.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** play.cpp	13 Mar 2005 04:58:29 -0000	1.11
--- play.cpp	2 Nov 2006 00:27:23 -0000	1.12
***************
*** 2,6 ****
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2005 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
--- 2,6 ----
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2006 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
***************
*** 118,122 ****
  	post("compiled on " __DATE__ " " __TIME__);
  #endif
! 	post("(C) Thomas Grill, 2001-2005");
  #if FLEXT_SYS == FLEXT_SYS_MAX
  	post("Arguments: %s [channels=1] [buffer]",thisName());
--- 118,122 ----
  	post("compiled on " __DATE__ " " __TIME__);
  #endif
! 	post("(C) Thomas Grill, 2001-2006");
  #if FLEXT_SYS == FLEXT_SYS_MAX
  	post("Arguments: %s [channels=1] [buffer]",thisName());

Index: groove.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/xsample/source/groove.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** groove.cpp	19 Nov 2005 23:15:44 -0000	1.36
--- groove.cpp	2 Nov 2006 00:27:23 -0000	1.37
***************
*** 2,6 ****
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2005 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
--- 2,6 ----
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2006 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
***************
*** 37,45 ****
  	void m_pos(float pos)
      {
! 	    setpos(s2u?pos/s2u:0);
          Update(xsc_pos,true);
      }
  
!     inline void m_posmod(float pos) { setposmod(pos?pos/s2u:0); } // motivated by Tim Blechmann
  
  	inline void mg_pos(float &v) const { v = curpos*s2u; }
--- 37,45 ----
  	void m_pos(float pos)
      {
! 	    setpos(LIKELY(s2u)?pos/s2u:0);
          Update(xsc_pos,true);
      }
  
!     inline void m_posmod(float pos) { setposmod(LIKELY(pos)?pos/s2u:0); } // motivated by Tim Blechmann
  
  	inline void mg_pos(float &v) const { v = curpos*s2u; }
***************
*** 88,93 ****
  	inline void setpos(double pos)
  	{
! 		if(pos < znsmin) curpos = znsmin;
! 		else if(pos > znsmax) curpos = znsmax;
  		else curpos = pos;
  	}
--- 88,93 ----
  	inline void setpos(double pos)
  	{
! 		if(UNLIKELY(pos < znsmin)) curpos = znsmin;
! 		else if(UNLIKELY(pos > znsmax)) curpos = znsmax;
  		else curpos = pos;
  	}
***************
*** 209,213 ****
  #if FLEXT_SYS == FLEXT_SYS_MAX
  		// old-style command line?
! 		if(argi == 1 && argc == 2 && CanbeInt(argv[argi])) {
  			outchns = GetAInt(argv[argi]);
  			argi++;
--- 209,213 ----
  #if FLEXT_SYS == FLEXT_SYS_MAX
  		// old-style command line?
! 		if(UNLIKELY(argi == 1 && argc == 2 && CanbeInt(argv[argi]))) {
  			outchns = GetAInt(argv[argi]);
  			argi++;
***************
*** 260,264 ****
  	ChkBuffer(true);
  
! 	_xzone = (xz < 0 || !s2u)?0:xz/s2u; 
      Update(xsc_fade,true);
  }
--- 260,264 ----
  	ChkBuffer(true);
  
! 	_xzone = (UNLIKELY(xz < 0) || UNLIKELY(!s2u))?0:xz/s2u; 
      Update(xsc_fade,true);
  }
***************
*** 266,270 ****
  void xgroove::ms_xshape(int sh) 
  { 
!     if(sh < 0 || sh > xss_hsine) sh = xss_lin;
  
  	xshape = (xs_shape)sh;
--- 266,270 ----
  void xgroove::ms_xshape(int sh) 
  { 
!     if(UNLIKELY(sh < 0) || UNLIKELY(sh > xss_hsine)) sh = xss_lin;
  
  	xshape = (xs_shape)sh;
***************
*** 301,305 ****
  	const double smin = curmin,smax = curmax,plen = smax-smin;
  
! 	if(plen > 0) {
  		register double o = curpos;
  
--- 301,305 ----
  	const double smin = curmin,smax = curmax,plen = smax-smin;
  
! 	if(LIKELY(plen > 0)) {
  		register double o = curpos;
  
***************
*** 307,312 ****
  			const t_sample spd = speed[i];  // must be first because the vector is reused for output!
  			
! 			if(!(o < smax)) { o = smax; lpbang = true; }
! 			else if(o < smin) { o = smin; lpbang = true; }
  			
  			pos[i] = o;
--- 307,312 ----
  			const t_sample spd = speed[i];  // must be first because the vector is reused for output!
  			
! 			if(UNLIKELY(!(o < smax))) { o = smax; lpbang = true; }
! 			else if(UNLIKELY(o < smin)) { o = smin; lpbang = true; }
  			
  			pos[i] = o;
***************
*** 323,327 ****
  		s_pos_off(n,invecs,outvecs);
  		
! 	if(lpbang) ToOutBang(outchns+3);
  }
  
--- 323,327 ----
  		s_pos_off(n,invecs,outvecs);
  		
! 	if(UNLIKELY(lpbang)) ToOutBang(outchns+3);
  }
  
***************
*** 339,355 ****
  	const double smin = curmin,smax = curmax,plen = smax-smin;
  
! 	if(plen > 0) {
  		register double o = curpos;
  
!         if(wrap && smin < 0 && smax >= buf.Frames()) {
  		    for(int i = 0; i < n; ++i) {	
  			    const t_sample spd = speed[i];  // must be first because the vector is reused for output!
  
  			    // normalize offset
! 			    if(!(o < smax)) {  // faster than o >= smax
  				    o = fmod(o-smin,plen)+smin;
  				    lpbang = true;
  			    }
! 			    else if(o < smin) {
  				    o = fmod(o-smin,plen)+smax; 
  				    lpbang = true;
--- 339,355 ----
  	const double smin = curmin,smax = curmax,plen = smax-smin;
  
! 	if(LIKELY(plen > 0)) {
  		register double o = curpos;
  
!         if(wrap && UNLIKELY(smin < 0) && UNLIKELY(smax >= buf.Frames())) {
  		    for(int i = 0; i < n; ++i) {	
  			    const t_sample spd = speed[i];  // must be first because the vector is reused for output!
  
  			    // normalize offset
! 			    if(UNLIKELY(!(o < smax))) {  // faster than o >= smax
  				    o = fmod(o-smin,plen)+smin;
  				    lpbang = true;
  			    }
! 			    else if(UNLIKELY(o < smin)) {
  				    o = fmod(o-smin,plen)+smax; 
  				    lpbang = true;
***************
*** 366,374 ****
  
  			    // normalize offset
! 			    if(!(o < smax)) {  // faster than o >= smax
  				    o = fmod(o-smin,plen)+smin;
  				    lpbang = true;
  			    }
! 			    else if(o < smin) {
  				    o = fmod(o-smin,plen)+smax; 
  				    lpbang = true;
--- 366,374 ----
  
  			    // normalize offset
! 			    if(UNLIKELY(!(o < smax))) {  // faster than o >= smax
  				    o = fmod(o-smin,plen)+smin;
  				    lpbang = true;
  			    }
! 			    else if(UNLIKELY(o < smin)) {
  				    o = fmod(o-smin,plen)+smax; 
  				    lpbang = true;
***************
*** 394,398 ****
  #endif
  
! 	if(lpbang) ToOutBang(outchns+3);
  }
  
--- 394,398 ----
  #endif
  
! 	if(UNLIKELY(lpbang)) ToOutBang(outchns+3);
  }
  
***************
*** 415,419 ****
  	curmin = smin,curmax = smax;
  
! 	if(plen > 0) {
  		bool inzn = false;
  		register double o = curpos;
--- 415,419 ----
  	curmin = smin,curmax = smax;
  
! 	if(LIKELY(plen > 0)) {
  		bool inzn = false;
  		register double o = curpos;
***************
*** 425,438 ****
   		for(int i = 0; i < n; ++i) {	
  			// normalize offset
!             if(o < smin) {
  				o = fmod(o-smin,plen)+smax; 
  				lpbang = true;
  			}
! 			else if(!(o < smax)) {
  				o = fmod(o-smin,plen)+smin;
  				lpbang = true;
  			}
  
! 			if(o < lmin) {
  				register float inp;
  				if(o < lmin2) {
--- 425,438 ----
   		for(int i = 0; i < n; ++i) {	
  			// normalize offset
!             if(UNLIKELY(o < smin)) {
  				o = fmod(o-smin,plen)+smax; 
  				lpbang = true;
  			}
! 			else if(UNLIKELY(!(o < smax))) {
  				o = fmod(o-smin,plen)+smin;
  				lpbang = true;
  			}
  
! 			if(UNLIKELY(o < lmin)) {
  				register float inp;
  				if(o < lmin2) {
***************
*** 457,461 ****
  				inzn = true;
  			}
! 			else if(!(o < lmax)) {
  				register float inp;
  				if(!(o < lmax2)) {
--- 457,461 ----
  				inzn = true;
  			}
! 			else if(UNLIKELY(!(o < lmax))) {
  				register float inp;
  				if(!(o < lmax2)) {
***************
*** 495,499 ****
  		arrscale(n,pos,pos);
  
! 		if(inzn) {
  			// only if we have touched the cross-fade zone
  			
--- 495,499 ----
  		arrscale(n,pos,pos);
  
! 		if(UNLIKELY(inzn)) {
  			// only if we have touched the cross-fade zone
  			
***************
*** 521,525 ****
  	curmin = cmin,curmax = cmax;
  
! 	if(lpbang) ToOutBang(outchns+3);
  }
  
--- 521,525 ----
  	curmin = cmin,curmax = cmax;
  
! 	if(UNLIKELY(lpbang)) ToOutBang(outchns+3);
  }
  
***************
*** 532,536 ****
  	const int smin = curmin,smax = curmax,plen = smax-smin;
  
! 	if(plen > 0) {
  		register double o = curpos;
  		register float bd = bidir;
--- 532,536 ----
  	const int smin = curmin,smax = curmax,plen = smax-smin;
  
! 	if(LIKELY(plen > 0)) {
  		register double o = curpos;
  		register float bd = bidir;
***************
*** 541,550 ****
  			// normalize offset
              // \todo at the moment fmod doesn't take bidirectionality into account!!
! 			if(!(o < smax)) {
  				o = smax-fmod(o-smax,plen); // mirror the position at smax
  				bd = -bd;
  				lpbang = true;
  			}
! 			else if(o < smin) {
  				o = smin+fmod(smin-o,plen); // mirror the position at smin
  				bd = -bd;
--- 541,550 ----
  			// normalize offset
              // \todo at the moment fmod doesn't take bidirectionality into account!!
! 			if(UNLIKELY(!(o < smax))) {
  				o = smax-fmod(o-smax,plen); // mirror the position at smax
  				bd = -bd;
  				lpbang = true;
  			}
! 			else if(UNLIKELY(o < smin)) {
  				o = smin+fmod(smin-o,plen); // mirror the position at smin
  				bd = -bd;
***************
*** 566,570 ****
  		s_pos_off(n,invecs,outvecs);
  		
! 	if(lpbang) ToOutBang(outchns+3);
  }
  
--- 566,570 ----
  		s_pos_off(n,invecs,outvecs);
  		
! 	if(UNLIKELY(lpbang)) ToOutBang(outchns+3);
  }
  
***************
*** 573,577 ****
      int ret = ChkBuffer(true);
  
!     if(ret) {
          FLEXT_ASSERT(buf.Valid());
          
--- 573,577 ----
      int ret = ChkBuffer(true);
  
!     if(LIKELY(ret)) {
          FLEXT_ASSERT(buf.Valid());
          
***************
*** 656,663 ****
  {
  	// \todo do we really need this?
! 	if(!s2u) return false; // this can happen if DSP is off 
  
      const long frames = buf.Frames();
!     if(!frames) return false;
  
  	xzone = _xzone; // make a copy for changing it
--- 656,663 ----
  {
  	// \todo do we really need this?
! 	if(UNLIKELY(!s2u)) return false; // this can happen if DSP is off 
  
      const long frames = buf.Frames();
!     if(UNLIKELY(!frames)) return false;
  
  	xzone = _xzone; // make a copy for changing it
***************
*** 757,761 ****
  {
  	post("%s - part of xsample objects, version " XSAMPLE_VERSION,thisName());
! 	post("(C) Thomas Grill, 2001-2005");
  #if FLEXT_SYS == FLEXT_SYS_MAX
  	post("Arguments: %s [channels=1] [buffer]",thisName());
--- 757,761 ----
  {
  	post("%s - part of xsample objects, version " XSAMPLE_VERSION,thisName());
! 	post("(C) Thomas Grill, 2001-2006");
  #if FLEXT_SYS == FLEXT_SYS_MAX
  	post("Arguments: %s [channels=1] [buffer]",thisName());

Index: inter.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/xsample/source/inter.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** inter.h	8 Jan 2005 04:59:44 -0000	1.9
--- inter.h	2 Nov 2006 00:27:23 -0000	1.10
***************
*** 2,6 ****
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2005 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
--- 2,6 ----
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2006 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
***************
*** 27,31 ****
  	// ----------------
  
!     if(smin == smax) {
          // zero loop length -> assume that smin is a valid sample position...
  
--- 27,31 ----
  	// ----------------
  
!     if(UNLIKELY(smin == smax)) {
          // zero loop length -> assume that smin is a valid sample position...
  
***************
*** 41,46 ****
  
              // for xplay oint can be out of bounds -> check
! 		    if(oint >= smin)
! 			    if(oint < smax) {
  				    // normal
  				    *(sig0++) = bdt[oint*BCHNS];
--- 41,46 ----
  
              // for xplay oint can be out of bounds -> check
! 		    if(LIKELY(oint >= smin))
! 			    if(LIKELY(oint < smax)) {
  				    // normal
  				    *(sig0++) = bdt[oint*BCHNS];
***************
*** 62,67 ****
  
              // for xplay oint can be out of bounds -> check
! 		    if(oint >= smin)
! 			    if(oint < smax) {
  				    // normal
  				    fp = bdt+oint*BCHNS;
--- 62,67 ----
  
              // for xplay oint can be out of bounds -> check
! 		    if(LIKELY(oint >= smin))
! 			    if(LIKELY(oint < smax)) {
  				    // normal
  				    fp = bdt+oint*BCHNS;
***************
*** 88,92 ****
  {
  	const int plen = smax-smin;
! 	if(plen < 2) {
  		st_play1 TMPLCALL (bdt,smin,smax,n,inchns,outchns,invecs,outvecs,looped);
  		return;
--- 88,92 ----
  {
  	const int plen = smax-smin;
! 	if(UNLIKELY(plen < 2)) {
  		st_play1 TMPLCALL (bdt,smin,smax,n,inchns,outchns,invecs,outvecs,looped);
  		return;
***************
*** 112,117 ****
  			t_sample fp0,fp1;
  
! 		    if(oint >= smin)
! 			    if(oint < maxo) {
  				    // normal interpolation
  			        fp0 = bdt[oint*BCHNS];
--- 112,117 ----
  			t_sample fp0,fp1;
  
! 		    if(LIKELY(oint >= smin))
! 			    if(LIKELY(oint < maxo)) {
  				    // normal interpolation
  			        fp0 = bdt[oint*BCHNS];
***************
*** 149,154 ****
  			const float frac = o-oint;
  
! 		    if(oint >= smin)
! 			    if(oint < maxo) {
  				    // normal interpolation
  			        fp0 = bdt+oint*BCHNS;
--- 149,154 ----
  			const float frac = o-oint;
  
! 		    if(LIKELY(oint >= smin))
! 			    if(LIKELY(oint < maxo)) {
  				    // normal interpolation
  			        fp0 = bdt+oint*BCHNS;
***************
*** 188,192 ****
  {
  	const int plen = smax-smin; //curlen;
! 	if(plen < 4) {
  		if(plen < 2) st_play1 TMPLCALL (bdt,smin,smax,n,inchns,outchns,invecs,outvecs,looped);
  		else st_play2 TMPLCALL (bdt,smin,smax,n,inchns,outchns,invecs,outvecs,looped);
--- 188,192 ----
  {
  	const int plen = smax-smin; //curlen;
! 	if(UNLIKELY(plen < 4)) {
  		if(plen < 2) st_play1 TMPLCALL (bdt,smin,smax,n,inchns,outchns,invecs,outvecs,looped);
  		else st_play2 TMPLCALL (bdt,smin,smax,n,inchns,outchns,invecs,outvecs,looped);
***************
*** 213,218 ****
              register const t_sample *ptr = bdt+oint*BCHNS;
  
!             if(oint > smin) {
! 			    if(oint < maxo-2) {
  				    // normal case
  				    fa = ptr[-BCHNS];
--- 213,218 ----
              register const t_sample *ptr = bdt+oint*BCHNS;
  
!             if(LIKELY(oint > smin)) {
! 			    if(LIKELY(oint < maxo-2)) {
  				    // normal case
  				    fa = ptr[-BCHNS];
***************
*** 307,312 ****
  		    register const t_sample *fa,*fb,*fc,*fd;
  
! 		    if(oint > smin)
! 			    if(oint < maxo-2) {
  				    // normal case
      				fb = ptr;
--- 307,312 ----
  		    register const t_sample *fa,*fb,*fc,*fd;
  
! 		    if(LIKELY(oint > smin))
! 			    if(LIKELY(oint < maxo-2)) {
  				    // normal case
      				fb = ptr;

Index: main.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/xsample/source/main.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** main.h	19 Nov 2005 23:15:44 -0000	1.41
--- main.h	2 Nov 2006 00:27:23 -0000	1.42
***************
*** 2,6 ****
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2005 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
--- 2,6 ----
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2006 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  

Index: record.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/xsample/source/record.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** record.cpp	26 Sep 2005 14:00:26 -0000	1.19
--- record.cpp	2 Nov 2006 00:27:23 -0000	1.20
***************
*** 2,6 ****
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2005 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
--- 2,6 ----
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2006 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
***************
*** 26,30 ****
  	void m_pos(float pos)
      {
! 	    curpos = pos?CASTINT<long>(pos/s2u+.5):0;
          Update(xsc_pos);
          Refresh();
--- 26,30 ----
  	void m_pos(float pos)
      {
! 	    curpos = LIKELY(pos)?CASTINT<long>(pos/s2u+.5):0;
          Update(xsc_pos);
          Refresh();
***************
*** 211,219 ****
  	if(o < curmin) o = curmin;
  
! 	if(dorec && curmax > curmin) {
  		while(n) {
  			long ncur = curmax-o; // at max to buffer or recording end
  
! 			if(ncur <= 0) {	// end of buffer
  				if(doloop) { 
  					ncur = curmax-(o = curmin);
--- 211,219 ----
  	if(o < curmin) o = curmin;
  
! 	if(dorec && LIKELY(curmax > curmin)) {
  		while(n) {
  			long ncur = curmax-o; // at max to buffer or recording end
  
! 			if(UNLIKELY(ncur <= 0)) {	// end of buffer
  				if(doloop) { 
  					ncur = curmax-(o = curmin);
***************
*** 228,234 ****
  			}
  
! 			if(!dorec) break;
  
! 			if(ncur > n) ncur = n;
  			
  			register int i;
--- 228,234 ----
  			}
  
! 			if(UNLIKELY(!dorec)) break;
  
! 			if(UNLIKELY(ncur > n)) ncur = n;
  			
  			register int i;
***************
*** 453,457 ****
  	post("compiled on " __DATE__ " " __TIME__);
  #endif
! 	post("(C) Thomas Grill, 2001-2005");
  #if FLEXT_SYS == FLEXT_SYS_MAX
  	post("Arguments: %s [channels=1] [buffer]",thisName());
--- 453,457 ----
  	post("compiled on " __DATE__ " " __TIME__);
  #endif
! 	post("(C) Thomas Grill, 2001-2006");
  #if FLEXT_SYS == FLEXT_SYS_MAX
  	post("Arguments: %s [channels=1] [buffer]",thisName());

Index: inter.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/xsample/source/inter.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** inter.cpp	8 Jan 2005 04:59:44 -0000	1.9
--- inter.cpp	2 Nov 2006 00:27:23 -0000	1.10
***************
*** 2,6 ****
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2005 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
--- 2,6 ----
  xsample - extended sample objects for Max/MSP and pd (pure data)
  
! Copyright (c) 2001-2006 Thomas Grill (gr at grrrr.org)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  





More information about the Pd-cvs mailing list