def _tdoa_shift(idx, cc_size, fs=None):
    """convert index in cc to tdoa"""
    if idx > cc_size / 2:
        idx = idx - cc_size 
    if fs is None:
        return idx
    else:
        return 1.0 * idx / fs