diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2011-08-16 17:26:41 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2011-08-16 17:26:41 (GMT) |
commit | 6f9fae5958347493b2b8cab19776a4d37f647c69 (patch) | |
tree | 18c983eb898a5034e7108f4d6d404b1ccd90c872 /common/Util | |
parent | 9c88bd15d292e33d19798c3adaa2bbc6f4adfd5a (diff) |
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 <gonzalo@laptop.org>
Diffstat (limited to 'common/Util')
-rw-r--r-- | common/Util/Clooper/aclient.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
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; } |