Resample `samples` with given samplerate `sr` to new samplerate `newsr`

    samples: mono or multichannel frames
    oldsr  : original samplerate
    newsr  : new sample rate

    Returns: the new samples

def resample(samples, oldsr, newsr):
    # type: (np.ndarray, int, int) -> np.ndarray
    """
    Resample `samples` with given samplerate `sr` to new samplerate `newsr`

    samples: mono or multichannel frames
    oldsr  : original samplerate
    newsr  : new sample rate

    Returns: the new samples
    """
    backends = [
        _resample_samplerate,   # turns the samples into float32, which is ok for audio 
        _resample_scikits,
        _resample_nnresample,   # very good results, follows libsamplerate closely
        _resample_obspy,        # these last two introduce some error at the first samples
        _resample_scipy
    ]  # type: List[Callable[[np.ndarray, int, int], Opt[np.ndarray]]]

    for backend in backends:
        newsamples = backend(samples, oldsr, newsr)
        if newsamples is not None:
            return newsamples