rework sampling-rate conversion to handle non-integer factors - possibly ok under Matlab, but not yet correct under Octave