Ticket #8660: diff
File diff, 672 bytes (added by , 18 years ago) |
---|
-
rate.h
44 44 #define ST_SUCCESS (0) 45 45 46 46 static inline void clampedAdd(int16& a, int b) { 47 #if defined(ARM) && !defined(OUTPUT_UNSIGNED_AUDIO) 48 asm("MOV %1,%1,LSL #16\n\t" 49 "ADDS %0,%1,%0,LSL #16\n\t" 50 "MOVVS %0,#0\n\t" 51 "RSCVS %0,%0,#1<<31\n\t" 52 "MOV %0,%0,LSR #16\n\t" : 53 "+r" (a), "+r" (b) : : "cc" 54 ); 55 #else 47 56 register int val; 48 57 #ifdef OUTPUT_UNSIGNED_AUDIO 49 58 val = (a ^ 0x8000) + b; … … 61 70 #else 62 71 a = val; 63 72 #endif 73 #endif 64 74 } 65 75 66 76 // Q&D hack to get this SOX stuff to work