Add downsampling support, both bits per sample and sample rate.