--- linuxsampler/trunk/src/engines/common/BiquadFilter.h 2004/12/13 00:46:42 319 +++ linuxsampler/trunk/src/engines/common/BiquadFilter.h 2005/02/09 01:22:18 361 @@ -25,6 +25,8 @@ #include +#include "../../common/global.h" + /// ln(2) / 2 #define LN_2_2 0.34657359f @@ -44,11 +46,11 @@ * between multiple filters. */ struct biquad_param_t { - bq_t a1; - bq_t a2; bq_t b0; bq_t b1; bq_t b2; + bq_t a1; + bq_t a2; }; /** @@ -58,11 +60,11 @@ class BiquadFilter { protected: // following five variables are only used if no external biquad_param_t reference is used - bq_t a1; - bq_t a2; bq_t b0; bq_t b1; bq_t b2; + bq_t a1; + bq_t a2; // following four variables are used to buffer the feedback bq_t x1; bq_t x2; @@ -121,6 +123,7 @@ return y; } +#if ARCH_X86 // expects to find input in xmm0 (xmm0 stays unmodified) and finally leaves output in xmm6 inline void Apply4StepsSSE(biquad_param_t* param) { __asm__ __volatile__ ( @@ -207,6 +210,7 @@ "r" (¶m->b0) /* %2 */ ); } +#endif // ARCH_X86 inline bq_t ApplyFB(bq_t x, const bq_t fb) { bq_t y; @@ -238,6 +242,7 @@ return y; } +#if ARCH_X86 // expects to find input in xmm0 (xmm0 stays unmodified) and finally leaves output in xmm7 inline void ApplyFB4StepsSSE(biquad_param_t* param, const bq_t &fb) { float xs, ys; @@ -433,6 +438,7 @@ :: ); } +#endif // ARCH_X86 }; class LowpassFilter : public BiquadFilter {