ft2-clone

Fasttracker 2 clone
Log | Files | Refs | README | LICENSE

ft2_mix.h (718B)


      1 #pragma once
      2 
      3 #include <stdint.h>
      4 
      5 enum
      6 {
      7 	// don't change the order of these! (yes, it looks weird)
      8 	INTERPOLATION_DISABLED  = 0,
      9 	INTERPOLATION_SINC8     = 1,
     10 	INTERPOLATION_LINEAR    = 2,
     11 	INTERPOLATION_SINC16    = 3,
     12 	INTERPOLATION_CUBIC     = 4,
     13 	INTERPOLATION_QUADRATIC = 5,
     14 	// ------
     15 
     16 	NUM_INTERPOLATORS,
     17 };
     18 
     19 #define MAX_TAPS 16
     20 #define MAX_LEFT_TAPS ((MAX_TAPS/2)-1)
     21 #define MAX_RIGHT_TAPS (MAX_TAPS/2)
     22 
     23 // the fractional bits are hardcoded, changing these will break things!
     24 #define MIXER_FRAC_BITS 32
     25 
     26 #define MIXER_FRAC_SCALE ((int64_t)1 << MIXER_FRAC_BITS)
     27 #define MIXER_FRAC_MASK (MIXER_FRAC_SCALE-1)
     28 
     29 typedef void (*mixFunc)(void *, uint32_t, uint32_t);
     30 
     31 extern const mixFunc mixFuncTab[]; // ft2_mix.c