lowpass filter 315Hz / 12dB octave

If the incoming signal is known to be 20kHz band-limited, then the need for an analog anti-aliasing
filter is only if you sample at less than 44kSPS or so.

Since the requirements for anti-aliasing for the audio band are severe (the human ear has a 100dB dynamic
range at least), you are strongly advised to sample at 44kSPS or above if possible before trying to
digitally low-pass filter. Otherwise you might as well use an analog low pass filter as it will be much
less tricky to design than the brick-wall antialiasing filter needed to support lower sampling rates.

Use an IIR digital filter, the Arduino cannot handle the dozens of coefficients needed for a FIR filter.