How can efficient and accurate up/down sampling be done?
If you are down-sampling, you need to lowpass filter the signal to remove anything above the new Nyquist rate, then discard samples. If you are upsampling, you need to insert zero samples between the old samples, then lowpass filter to remove anything above the old Nyquist rate. In both cases, you can take advantage of the fact that either many of the input samples to the filter are zero, or many of the output samples from the filter are not used. The trick to doing this is called Poly-Rate or Poly-Phase filtering.