'Raises TrueAudioHeaderError'

@convert_error(IOError, TrueAudioHeaderError)
def __init__(self, fileobj, offset):

    fileobj.seek((offset or 0))
    header = fileobj.read(18)
    if ((len(header) != 18) or (not header.startswith('TTA'))):
        raise TrueAudioHeaderError('TTA    header    not    found')
    self.sample_rate = cdata.int_le(header[10:14])
    samples = cdata.uint_le(header[14:18])
    self.length = (float(samples) / self.sample_rate)
