private int getFIRInterpolated ( final int currentSamplePos , final int currentTuningPos ) { final int poslo = currentTuningPos & WindowedFIR . WFIR_POSFRACMASK ; final int firidx = ( ( poslo + WindowedFIR . WFIR_FRACHALVE ) >> WindowedFIR . WFIR_FRACSHIFT ) & WindowedFIR . WFIR_FRACMASK ; final long v1 = ( ( ( currentSamplePos - 3 ) < 0 ) ? 0L : ( long ) WindowedFIR . lut [ firidx ] * ( long ) sample [ currentSamplePos - 3 ] ) + ( ( ( currentSamplePos - 2 ) < 0 ) ? 0L : ( long ) WindowedFIR . lut [ firidx + 1 ] * ( long ) sample [ currentSamplePos - 2 ] ) + ( ( ( currentSamplePos - 1 ) < 0 ) ? 0L : ( long ) WindowedFIR . lut [ firidx + 2 ] * ( long ) sample [ currentSamplePos - 1 ] ) + ( ( long ) WindowedFIR . lut [ firidx + 3 ] * ( long ) sample [ currentSamplePos ] ) ; final long v2 = ( ( long ) WindowedFIR . lut [ firidx + 4 ] * ( long ) sample [ currentSamplePos + 1 ] ) + ( ( long ) WindowedFIR . lut [ firidx + 5 ] * ( long ) sample [ currentSamplePos + 2 ] ) + ( ( long ) WindowedFIR . lut [ firidx + 6 ] * ( long ) sample [ currentSamplePos + 3 ] ) + ( ( long ) WindowedFIR . lut [ firidx + 7 ] * ( long ) sample [ currentSamplePos + 4 ] ) ; return ( int ) ( ( ( v1 >> 1 ) + ( v2 >> 1 ) ) >> WindowedFIR . WFIR_16BITSHIFT ) ; }
does a windowed fir interploation with the next sample