Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
def amrPayload2Storage_OctetAlignedMode(payload): try: # assume no interleaving, CRCs or bit re-ordering bitlen = [95,103,118,134,148,159,204,244,39] amr = BitArray(bytes=payload) cmr = amr[0:4] res = amr[4:8] assert res.uint==0,'amr[4:8] must be zero' f = amr mode = amr[9:13] qual = amr[13:14] pad = amr[14:16] if mode.uint >=0 and mode.uint <= 8: assert amr.len >= 16+bitlen[mode.uint] voice = amr[16:16+bitlen[mode.uint]] storage = BitArray(bin='0') storage.append(mode) storage.append(qual) storage.append('0b00') # padding assert storage.len==8,"check length of storage header is one byte" storage.append(voice) return storage.tobytes() except: import pdb # pdb.pm() # or pdb.post_mortem() pdb.set_trace() return ''
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.