added code for downsampling with SRC