From 6f9fae5958347493b2b8cab19776a4d37f647c69 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Tue, 16 Aug 2011 17:26:41 +0000 Subject: Remove macro because can't be compiled in ARM processors The macro was already partialy substituted in the C++ code, only in one place was pending. Now substituted this las place and removed the macro and commented code. Was tested in XO-1, XO-1.5 and XO-1.75, and there are not visible performace differences. Signe-off-by: Gonzalo Odiard --- (limited to 'common/Util') diff --git a/common/Util/Clooper/aclient.cpp b/common/Util/Clooper/aclient.cpp index 1a8e81b..f238c36 100644 --- a/common/Util/Clooper/aclient.cpp +++ b/common/Util/Clooper/aclient.cpp @@ -27,7 +27,6 @@ static double pytime(const struct timeval * tv) #include "log.cpp" #include "audio.cpp" -#define FLOAT_TO_SHORT(in,out) __asm__ __volatile__ ("fistps %0" : "=m" (out) : "t" (in) : "st") ; int VERBOSE = 3; FILE * _debug = NULL; @@ -628,12 +627,6 @@ struct TamTamSound cursample[0] = (signed short int) (cbuf[cbuf_pos*2+0] * (1<<15)); cursample[1] = (signed short int) (cbuf[cbuf_pos*2+1] * (1<<15)); -/* - cbuf[cbuf_pos*2+0] *= (float) ((1<<14)); - cbuf[cbuf_pos*2+1] *= (float) ((1<<14)); - FLOAT_TO_SHORT( cbuf[cbuf_pos*2+0], cursample[0]); - FLOAT_TO_SHORT( cbuf[cbuf_pos*2+1], cursample[1]); -*/ } upbuf[2*up_pos+0] = cursample[0]; upbuf[2*up_pos+1] = cursample[1]; @@ -643,11 +636,6 @@ struct TamTamSound ++cbuf_pos; cursample[0] = (signed short int) (cbuf[cbuf_pos*2+0] * (1<<15)); cursample[1] = (signed short int) (cbuf[cbuf_pos*2+1] * (1<<15)); - /*cbuf[cbuf_pos*2+0] *= (float) ((1<<14)); - cbuf[cbuf_pos*2+1] *= (float) ((1<<14)); - FLOAT_TO_SHORT( cbuf[cbuf_pos*2+0], cursample[0]); - FLOAT_TO_SHORT( cbuf[cbuf_pos*2+1], cursample[1]); -*/ } if (++up_pos == (signed)sys_stuff->period_size) break; @@ -663,7 +651,7 @@ struct TamTamSound for (int i = 0; i < csound_nframes * nchannels; ++i) { cbuf[i] *= (float) ((1<<15)-100.0f); - FLOAT_TO_SHORT( cbuf[i], upbuf[i]); + upbuf[i] = (signed short int) cbuf[i]; } if (0 > sys_stuff->writebuf(csound_nframes,upbuf)) break; } -- cgit v0.9.1