def _resample_samplerate(samples, sr, newsr):
    # type: (np.ndarray, int, int, str) -> np.ndarray
    """
    Uses https://github.com/tuxu/python-samplerate
    """
    try:
        from samplerate import resample
    except ImportError:
        return None

    ratio = newsr/sr
    return _applyMultichan(samples,
                           lambda S: resample(S, ratio, 'sinc_best'))