From 1be9429281d7eb7a0cae509b23ed4482768a68f1 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 16 Dec 2004 05:02:25 +0000 Subject: - made xcode project - fixed loop record bug - some small cleanups svn path=/trunk/; revision=2391 --- externals/grill/xsample/source/groove.cpp | 9 +++++---- externals/grill/xsample/source/inter.cpp | 6 ------ externals/grill/xsample/source/main.h | 12 ++++-------- externals/grill/xsample/source/prefix.h | 14 ++++++++++++++ externals/grill/xsample/source/record.cpp | 15 ++++++++------- externals/grill/xsample/source/xsample-Info.plist | 22 ++++++++++++++++++++++ 6 files changed, 53 insertions(+), 25 deletions(-) create mode 100644 externals/grill/xsample/source/prefix.h create mode 100644 externals/grill/xsample/source/xsample-Info.plist (limited to 'externals/grill/xsample/source') diff --git a/externals/grill/xsample/source/groove.cpp b/externals/grill/xsample/source/groove.cpp index a3f2ed02..341d241f 100644 --- a/externals/grill/xsample/source/groove.cpp +++ b/externals/grill/xsample/source/groove.cpp @@ -197,11 +197,11 @@ V xgroove::setup(t_classid c) } xgroove::xgroove(I argc,const t_atom *argv): - loopmode(xsl_loop),curpos(0), - _xzone(0),xzone(0),pblksz(0), + loopmode(xsl_loop),curpos(0),bidir(1), + _xzone(0),xzone(0), xfade(xsf_keeplooppos),xshape(xss_lin), - znidx(NULL),znpos(NULL), - bidir(1) + znpos(NULL),znmul(NULL),znidx(NULL), + pblksz(0) { I argi = 0; #if FLEXT_SYS == FLEXT_SYS_MAX @@ -867,6 +867,7 @@ V xgroove::s_dsp() case xsl_bidir: SETSIGFUN(posfun,SIGFUN(s_pos_bidir)); break; + default: ; // just to prevent warning } } else diff --git a/externals/grill/xsample/source/inter.cpp b/externals/grill/xsample/source/inter.cpp index 3490044a..fe63fce8 100644 --- a/externals/grill/xsample/source/inter.cpp +++ b/externals/grill/xsample/source/inter.cpp @@ -24,12 +24,6 @@ void xinter::setup(t_classid c) FLEXT_CADDATTR_VAR_E(c,"interp",interp,m_interp); } -xinter::xinter(): - doplay(false),outchns(1), - interp(xsi_4p) -{ -} - I xinter::m_set(I argc,const t_atom *argv) { I r = xsample::m_set(argc,argv); diff --git a/externals/grill/xsample/source/main.h b/externals/grill/xsample/source/main.h index c6511139..3608a55c 100644 --- a/externals/grill/xsample/source/main.h +++ b/externals/grill/xsample/source/main.h @@ -11,18 +11,14 @@ WARRANTIES, see the file, "license.txt," in this distribution. #ifndef __XSAMPLE_H #define __XSAMPLE_H - -#define XSAMPLE_VERSION "0.3.1pre3" - - -#define FLEXT_ATTRIBUTES 1 - -#include +#include "prefix.h" #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least flext version 0.4.6 #endif +#define XSAMPLE_VERSION "0.3.1pre3" + // most compilers are somehow broken - in other words - can't handle all C++ features @@ -295,7 +291,7 @@ class xinter: FLEXT_HEADER_S(xinter,xsample,setup) public: - xinter(); + xinter(): outchns(1),doplay(false),interp(xsi_4p) {} protected: virtual I m_set(I argc,const t_atom *argv); diff --git a/externals/grill/xsample/source/prefix.h b/externals/grill/xsample/source/prefix.h new file mode 100644 index 00000000..ef9cb7ea --- /dev/null +++ b/externals/grill/xsample/source/prefix.h @@ -0,0 +1,14 @@ +/* + +xsample - extended sample objects for Max/MSP and pd (pure data) + +Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +*/ + +#define FLEXT_ATTRIBUTES 1 + +#include + diff --git a/externals/grill/xsample/source/record.cpp b/externals/grill/xsample/source/record.cpp index f297b04c..a30f87cb 100644 --- a/externals/grill/xsample/source/record.cpp +++ b/externals/grill/xsample/source/record.cpp @@ -108,11 +108,11 @@ V xrecord::setup(t_classid c) } xrecord::xrecord(I argc,const t_atom *argv): - dorec(false), - sigmode(false),mixmode(0), - appmode(true),doloop(false), + inchns(1), + sigmode(false),appmode(true), drintv(0), - inchns(1) + dorec(false),doloop(false), + mixmode(0) { I argi = 0; #if FLEXT_SYS == FLEXT_SYS_MAX @@ -394,8 +394,9 @@ TMPLDEF V xrecord::s_rec(I n,S *const *invecs,S *const *outvecs) case 0: { for(int ci = 0; ci < ICHNS; ++ci) { register S *b = bf+ci; - register const F *s = sig[ci]; - for(i = 0; i < ncur; ++i,b += BCHNS,++s) *b = *s; + register const F *s = sig[ci]+si; + for(i = 0; i < ncur; ++i,b += BCHNS,++s) + *b = *s; } si += ncur; break; @@ -412,7 +413,7 @@ TMPLDEF V xrecord::s_rec(I n,S *const *invecs,S *const *outvecs) case 2: { for(int ci = 0; ci < ICHNS; ++ci) { register S *b = bf+ci; - register const F *s = sig[ci]; + register const F *s = sig[ci]+si; for(i = 0; i < ncur; ++i,b += BCHNS,++s) *b += *s; } si += ncur; diff --git a/externals/grill/xsample/source/xsample-Info.plist b/externals/grill/xsample/source/xsample-Info.plist new file mode 100644 index 00000000..e9dd72e1 --- /dev/null +++ b/externals/grill/xsample/source/xsample-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + xsample + CFBundleIdentifier + org.grrrr.xsample + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + CSResourcesFileMapped + yes + + -- cgit v1.2.1