SDL_mixer timidity/resample.c patch

Those of us who like to eke out every possible bit of performance by
turning off timidity’s interpolation may have come upon a problem: the
alternate ‘#define INTERPVARS’ doesn’t, er, define anything. Here’s a
patch that has one INTERPVARS to rule them all:
------------------------------- CUT HERE -------------------------------
— SDL_mixer-1.2.1/timidity/resample.c Tue Dec 18 17:04:36 2001
+++ SDL_mixer-1.2.1.mwm/timidity/resample.c Mon Feb 11 20:50:12 2002
@@ -46,12 +46,11 @@
v2=src[(ofs>>FRACTION_BITS)+1];
*dest++ = v1 + (((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS);

endif

-# define INTERPVARS sample_t v1, v2
#else
/* Earplugs recommended for maximum listening enjoyment */

define RESAMPLATION *dest++=src[ofs>>FRACTION_BITS];

-# define INTERPVARS
#endif
+# define INTERPVARS sample_t v1, v2

#define FINALINTERP if (ofs == le) dest++=src[ofs>>FRACTION_BITS];
/
So it isn’t interpolation. At least it’s final. */
------------------------------- CUT HERE ---------------------------------
Matthew W. Miller – @Matthew_W_Miller