diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-02-11 04:37:35 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-02-11 04:37:35 +0000 |
commit | 97926eb08cf74f277e522ffb8c7f985457822de3 (patch) | |
tree | 680b0e4c564057340a0b528ea6468d4e381a907d /externals/grill/flext/source/flsupport.h | |
parent | 06f62d1168209ca6b9e2c3c5264c96a0a4c7cc98 (diff) |
""
svn path=/trunk/; revision=388
Diffstat (limited to 'externals/grill/flext/source/flsupport.h')
-rw-r--r-- | externals/grill/flext/source/flsupport.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h index 66f16dac..497351d2 100644 --- a/externals/grill/flext/source/flsupport.h +++ b/externals/grill/flext/source/flsupport.h @@ -95,6 +95,10 @@ public: */ bool Ok() const { return sym != NULL && data != NULL; } + /*! \brief Check if buffer is valid + */ + bool Valid() const; + /*! \brief Check and update if the buffer has been changed (e.g. resized) */ bool Update(); @@ -167,17 +171,21 @@ public: static t_atom *CopyList(int argc,const t_atom *argv); //! Copy a memory region static void CopyMem(void *dst,const void *src,int bytes); - static void CopySamples(t_sample *dst,const t_sample *src,int cnt) { CopyMem(dst,src,cnt*sizeof(t_sample)); } - //! Zero a memory region + static void CopySamples(t_sample *dst,const t_sample *src,int cnt); + //! Set a memory region static void ZeroMem(void *dst,int bytes); - static void ZeroSamples(t_sample *dst,int cnt) { ZeroMem(dst,cnt*sizeof(t_sample)); } + static void SetSamples(t_sample *dst,int cnt,t_sample s); + static void ZeroSamples(t_sample *dst,int cnt) { SetSamples(dst,cnt,0); } //! Sleep for an amount of time static void Sleep(double s); + //! Get a 32 bit hash value frm an atom + static unsigned long AtomHash(const t_atom &a); + /*! \brief Fold value to a number of bits - \remark Good for hash generation + \remark Good for hash tables */ static unsigned int FoldBits(unsigned long h,int bits); |