From 97926eb08cf74f277e522ffb8c7f985457822de3 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 11 Feb 2003 04:37:35 +0000 Subject: "" svn path=/trunk/; revision=388 --- externals/grill/flext/source/flsupport.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'externals/grill/flext/source/flsupport.h') 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); -- cgit v1.2.1