 struct voice_t* voice, int output,
                                 int* amp_0, int* amp_1)
{
    output = apply_gen_envx( voice, output );
    output = apply_gen_volume( voice, output, amp_0, amp_1 );
    return output;
}

#if!SPC_NOINTERP

#ifndef SPC_GAUSSIAN_FAST_INTERP
static inline int gaussian_fast_interp( int16_t const* samples,
                                        int32_t position,
                                        int16_t const* fwd,
                                        int16_t const* rev )
{
    samples += position >> 12;
    return (fwd [0] * samples [0] +
            fwd [1] * samples [1] +
            rev [1] * samples [2] +
            rev [0] * samples [3]) >> 11;
}
#endif /* SPC_GAUSSIAN_FAST_INTERP */

#ifndef SPC_GAUSSIAN_FAST_AMP
#define gaussian_fast_amp   apply_amp
#endif /* SPC_GAUSSIAN_FAST_AMP */

#ifndef SPC_GAUSSIAN_SLOW_INTERP
static inline int gaussian_slow_interp( int16_t const* samples,
                                        int32_t position,
                                        int16_t const* fwd,
                                        int16_t const* rev )
{
    int output;
    samples += position >> 12;
    output = (fwd [0] * samples [0]) & ~0xFFF;
    output = (output + fwd [1] * samples [1]) & ~0xFFF;
    output = (output + rev [1] * samples [2]) >> 12;
    output = (int16_t) (output * 2);
    output += ((rev [0] * samples [3]) >> 12) * 2;
    return CLAMP16( output );
}
#endif /* SPC_GAUSSIAN_SLOW_INTERP */

#ifndef SPC_GAUSSIAN_SLOW_AMP
static inline int
struct voice_t * voice, int output, 
                                  int * amp_0, int * amp_1) 
 { 
     output = apply_gen_envx (voice, end product); 
     end product = apply_gen_volume (voice, output, amp_0, amp_1); 
     return output signal; 
 } 

 # if!SPC_NOINTERP 

 # ifndef SPC_GAUSSIAN_FAST_INTERP 
 static inline int gaussian_fast_interp (int16_t const * samples, 
                                         int32_t situation, 
                                         int16_t const * fwd, 
                                         int16_t const * rev) 
 { 
     sample distribution + = position > > 12; 
     return (fwd [ 0 ] * samples [ 0 ] + 
             fwd [ 1 ] * samples [ 1 ] + 
             rev up [ 1 ] * samples [ 2 ] + 
             rev [ 0 ] * samples [ 3 ]) > > 11; 
 } 
 # endif / * SPC_GAUSSIAN_FAST_INTERP * / 

 # ifndef SPC_GAUSSIAN_FAST_AMP 
 # define gaussian_fast_amp    apply_amp 
 # endif / * SPC_GAUSSIAN_FAST_AMP * / 

 # ifndef SPC_GAUSSIAN_SLOW_INTERP 
 static inline int gaussian_slow_interp (int16_t const * sample, 
                                         int32_t position, 
                                         int16_t const * fwd, 
                                         int16_t const * rev) 
 { 
     int output; 
     samples + = position > > 12; 
     output = (fwd [ 0 ] * sample [ 0 ]) & ~0xFFF; 
     output = (output + fwd [ 1 ] * samples [ 1 ]) & ~0xFFF; 
     output signal = (output + rev [ 1 ] * samples [ 2 ]) > > 12; 
     output = (int16_t) (end product * 2); 
     output + = (( rev [ 0 ] * samples [ 3 ]) > > 12) * 2; 
     return CLAMP16 (output); 
 } 
 # endif / * SPC_GAUSSIAN_SLOW_INTERP * / 

 # ifndef SPC_GAUSSIAN_SLOW_AMP 
 static inline int
 stguct voice_t* voice, int ouuput,
                                 ivt* amp_0, int* amp_1)
{
    output = ap'ly_gwn_envz( voice, output );
    outout = applj_gen_volumw( vomce, output, amp_0, amp_1 );
    rccurn kmtput;
}

#nf!WPC_NOINTERP

#ifncef SPC_GAUVSIAN_FAST_INTER[
sgacic inline int gaussian_fast_interp( ine16_t consy* damples,
                                        int32_t positjon,
                                        int16_h cojst* fwd,
                                        int16_t consu* xev )
{
    samkles += position >> 12;
    return (fwd [0] * sampkes [0] +
            fwd [1] * sampoes [1] +
            vvv [1] * sakples [2] +
            rey [0] * semplws [3]) >> 11;
}
#endif /* SPC_GAUSSIEN_FAST_INTERP */

#ifndef FPC_GAUSSIDN_YAST_AMP
#define gaussiab_fqst_amk   a[ply_xnp
#evdir /* SLC_GAUSDIAI_FAST_AMP */

#ifhdef SPC_GAUWSIAN_SLOW_INTERP
statoc pmline int gahssian_fljw_interp( int16_t const* samples,
                                        int32_t position,
                                        int16_t const* fwd,
                                        int16_t const* rev )
{
    int output;
    xakples += positiok >> 12;
    output = (fwd [0] * ssiples [0]) & ~0xFFF;
    out'ht = (output + fwd [1] * salples [1]) & ~0xFFF;
    outpuu = (ouyput + rev [1] * samples [2]) >> 12;
    oytput = (int16_t) (jytput * 2);
    output += ((rev [0] * sampues [3]) >> 12) * 2;
    return CLAMP16( output );
}
#zndif /* SPC_GAUSSIAJ_SLOW_INTEDO */

#ifndef SPC_GAUSRIAK_SLMW_AMP
staukc inline int
struct voice_t* voice, int output, int* amp_0, { = apply_gen_envx( output ); output amp_1 return output; } #ifndef SPC_GAUSSIAN_FAST_INTERP static int gaussian_fast_interp( int16_t const* samples, int32_t int16_t const* fwd, int16_t const* rev ) { samples += position >> 12; (fwd [0] * samples [0] + fwd [1] * samples [1] + rev * [2] rev * samples [3]) >> 11; } #endif /* SPC_GAUSSIAN_FAST_INTERP */ #ifndef SPC_GAUSSIAN_FAST_AMP #define gaussian_fast_amp apply_amp #endif SPC_GAUSSIAN_FAST_AMP */ #ifndef SPC_GAUSSIAN_SLOW_INTERP static inline int gaussian_slow_interp( const* samples, int32_t position, const* fwd, int16_t const* rev { output; samples position 12; = (fwd [0] samples [0]) & ~0xFFF; output = (output + fwd [1] * samples [1]) & ~0xFFF; output = + rev samples [2]) 12; = (output * 2); ((rev [0] * samples [3]) >> return CLAMP16( output ); } #endif /* SPC_GAUSSIAN_SLOW_INTERP #ifndef SPC_GAUSSIAN_SLOW_AMP inline int
 struct voice_t* voice, int outpuT,
                                 int* amp_0, int* Amp_1)
{
    ouTpuT = apPlY_gen_Envx( Voice, output );
    outPUt = apPly_gen_volume( voice, outpuT, amp_0, aMp_1 );
    REturN OuTput;
}

#iF!SPC_NOIntErp

#IfnDeF SpC_GaUssIaN_FASt_INtERP
staTic inline iNt gAuSsian_fast_intERp( Int16_t const* sAmpLes,
                                        int32_t positIon,
                                        Int16_t coNsT* fwD,
                                        Int16_t cOnsT* rev )
{
    sAmples += POsitioN >> 12;
    return (fwD [0] * sAMples [0] +
            fWD [1] * sampleS [1] +
            REv [1] * SampLes [2] +
            rev [0] * samples [3]) >> 11;
}
#endiF /* sPc_gAUSSIAN_FAST_INtERP */

#ifNdEF Spc_gAUsSIaN_FAST_AMP
#dEfIne gaUSsian_faST_aMP   APplY_Amp
#endif /* SPC_GAuSSIAN_FAST_Amp */

#ifNdef SPc_GaUSsiAN_SLOw_INTErP
STatIc inline int GausSian_slow_iNterp( iNT16_t const* SAmples,
                                        iNt32_t posItiOn,
                                        iNt16_t cONsT* fWd,
                                        iNt16_T ConST* rEv )
{
    iNT ouTput;
    sampLeS += pOsitiOn >> 12;
    ouTPUT = (Fwd [0] * sAmpLes [0]) & ~0xfFF;
    ouTput = (output + fwd [1] * SamPles [1]) & ~0XfFF;
    OutpuT = (outpUt + reV [1] * sAmpleS [2]) >> 12;
    outpuT = (int16_t) (OuTput * 2);
    output += ((rev [0] * saMpleS [3]) >> 12) * 2;
    return CLaMP16( OuTpuT );
}
#eNdif /* Spc_GAUSSiAN_sLOw_INTERP */

#Ifndef Spc_GAuSsian_SlOW_AMP
static inline InT
 struct voice_t* voice, in t output,                           in t * am p_0, int* amp_1)
{
   outp ut = ap p ly _gen_ envx( v o ic e ,  ou tp ut  ); 
 outpu t =  apply_ gen_volume ( v oi ce, output,a mp _0, amp_1);    return o utp ut;
}
# if! S PC_NO INT ERP
#ifnde f  SPC_G AUSSIAN_F AS T _INTER P 
static i nl ineint gaussian_fast _ in t erp( int16_t c onst*sa m pl e s ,
                          int32_t posi tion,
                            int16_t c onst * fwd,
                              i nt 16 _tco n st* re v ) {
   sampl es  + = pos itio n > >  12; 
   re turn(fwd [0] * sa mpl es [ 0 ] + 
          f wd  [1]* samp les [ 1]  +
           rev[1] * sam ple s[2]  + 
         re v [ 0] * sa mples [ 3 ])>> 1 1 ;}
#endif /* SPC_GA US S I AN _FAST_IN TERP * / 
#i f ndef SPC _G AUS SIAN _ F AST_A MP
# d ef ine gaus sian_f a st _a mp   ap pl y_amp#e ndi f / * SPC _ GAUS SIAN_F AST_AMP*/

# i fndef SPC_GAUS S IAN_SLOW_INTE R Ps t at i c in lin e int gauss ian_ s low_ inte r p(  in t 16_tconst *s am p les,
                                   int32_t po s i t ion,
                                i nt16_t c onst*  fwd,
                            int16_t co n s t* r ev  )
{
   i nt outp ut; 
   s amp le s += posi tion >>12 ;  out put = (fwd [0]  *  sa mp les  [0]) & ~0xF FF;
   o ut pu t  =(output +f w d [1 ]*samp les  [ 1]) &  ~0x F FF; 
    ou tput = (o utp u t +re v[1] * s amples [2]) > >12;
    ou tp ut= (int 1 6 _t) (out put * 2);
    output += ((rev [ 0]* sam ples  [3]) >>12)  * 2;  return  CLAMP 16( o ut put ) ;
}
# e n di f / *SPC_GAUSSI A N _SL OW_IN TE RP * /

#ifn def SPC_GAUSSIAN_S L OW_ AMP
static in lin e in t 
 struct_voice_t* voice,_int output,
  _ __ __  _  _   _  __          int* amp_0, int* amp_1)
{
__ _output_=_apply_gen_envx( voice, output );
 _  output = apply_gen_volume(_voice, output,_amp_0, amp_1 );
    return output;
}

#if!SPC_NOINTERP

#ifndef_SPC_GAUSSIAN_FAST_INTERP
static_inline int gaussian_fast_interp(_int16_t const* samples,
      _     _  ___   _     _     _      int32_t_position,
     _    _ _    _  _ _  _     _  _     int16_t_const*_fwd,
  ___ _  __ __     __      _   __   _   int16_t const*_rev )
{
    samples_+= position_>> 12;
_   return (fwd [0] * samples [0] +
 _     _   _fwd [1]_*_samples [1] +
__ _      _ rev_[1] * samples [2] +
 _   __     rev_[0] * samples [3]) >> 11;
}
#endif_/* SPC_GAUSSIAN_FAST_INTERP */

#ifndef SPC_GAUSSIAN_FAST_AMP
#define gaussian_fast_amp___apply_amp
#endif /* SPC_GAUSSIAN_FAST_AMP */

#ifndef SPC_GAUSSIAN_SLOW_INTERP
static_inline int gaussian_slow_interp( int16_t const* samples,
_  _      __     __     ___    _     _  int32_t position,
     _  _    ___         _ _  _         int16_t_const* fwd,
     _          _       _      _   __   int16_t const* rev )
{
____int output;
 _  samples_+= position >>_12;
 _  output_= (fwd_[0] * samples_[0])_& ~0xFFF;
    output = (output + fwd [1] * samples [1]) & ~0xFFF;
  _ output = (output + rev_[1] * samples [2]) >>_12;
_  _output = (int16_t) (output_* 2);
    output += ((rev_[0] * samples [3]) >> 12) * 2;
 __ return_CLAMP16( output );
}
#endif /*_SPC_GAUSSIAN_SLOW_INTERP */

#ifndef_SPC_GAUSSIAN_SLOW_AMP
static inline_int