aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flutil.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-03-03 07:57:50 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-03-03 07:57:50 +0000
commitc3ae6e7ab08db709ffa1975eea70bfc9461f1d6a (patch)
tree04f0076fb51a1ed9ff22b16385e07a4105bb34c3 /externals/grill/flext/source/flutil.cpp
parentfe9b0d819d5478fa8256a612f3ba7de44894baf5 (diff)
""
svn path=/trunk/; revision=448
Diffstat (limited to 'externals/grill/flext/source/flutil.cpp')
-rw-r--r--externals/grill/flext/source/flutil.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/externals/grill/flext/source/flutil.cpp b/externals/grill/flext/source/flutil.cpp
index 9be38cf1..f1035359 100644
--- a/externals/grill/flext/source/flutil.cpp
+++ b/externals/grill/flext/source/flutil.cpp
@@ -15,15 +15,6 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flext.h"
#include <string.h>
-#if FLEXT_OS == FLEXT_OS_WIN
-#include <windows.h>
-#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX || FLEXT_OSAPI == FLEXT_OSAPI_MAC_OSX
-#include <unistd.h>
-#elif FLEXT_OS == FLEXT_OS_MAC
-#include <Timer.h>
-#include <Threads.h>
-#endif
-
void flext::CopyMem(void *dst,const void *src,int bytes)
{
memcpy(dst,src,bytes);
@@ -34,51 +25,5 @@ void flext::ZeroMem(void *dst,int bytes)
memset(dst,0,bytes);
}
-void flext::CopySamples(t_sample *dst,const t_sample *src,int cnt)
-{
- int n = cnt>>3;
- cnt -= n<<3;
- while(n--) {
- dst[0] = src[0]; dst[1] = src[1];
- dst[2] = src[2]; dst[3] = src[3];
- dst[4] = src[4]; dst[5] = src[5];
- dst[6] = src[6]; dst[7] = src[7];
- src += 8,dst += 8;
- }
-
- while(cnt--) *(dst++) = *(src++);
-}
-
-void flext::SetSamples(t_sample *dst,int cnt,t_sample s)
-{
- int n = cnt>>3;
- cnt -= n<<3;
- while(n--) {
- dst[0] = dst[1] = dst[2] = dst[3] = dst[4] = dst[5] = dst[6] = dst[7] = s;
- dst += 8;
- }
-
- while(cnt--) *(dst++) = s;
-}
-void flext::Sleep(double s)
-{
-#if FLEXT_OS == FLEXT_OS_WIN
- ::Sleep((long)(s*1000.));
-#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX || FLEXT_OSAPI == FLEXT_OSAPI_MAC_OSX
- usleep((long)(s*1000000.));
-#elif FLEXT_OS == FLEXT_OS_MAC
- // that's just for OS9!
- UnsignedWide tick;
- Microseconds(&tick);
- double target = tick.hi*((double)(1L<<((sizeof tick.lo)*4))*(double)(1L<<((sizeof tick.lo)*4)))+tick.lo+s*1.e6;
- for(;;) {
- Microseconds(&tick);
- if(target <= tick.hi*((double)(1L<<((sizeof tick.lo)*4))*(double)(1L<<((sizeof tick.lo)*4)))+tick.lo) break;
- YieldToAnyThread(); // should we really yield?
- }
-#else
-#error
-#endif
-}