'Raises BitReaderError'

def _get_sampling_freq(self, r):

    samplingFrequencyIndex = r.bits(4)
    if (samplingFrequencyIndex == 15):
        samplingFrequency = r.bits(24)
    else:
        try:
            samplingFrequency = self._FREQS[samplingFrequencyIndex]
        except IndexError:
            samplingFrequency = 0
    return samplingFrequency
