Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!dialogic!gerry From: gerry@dialogic.com (Gerry Lachac) Newsgroups: comp.sys.amiga.audio Subject: Re: ULAW audio encoding Message-ID: <1991Apr01.195116.12180@dialogic.com> Date: 1 Apr 91 19:51:16 GMT References: <1991Mar28.161224.8705@cbnewse.att.com> <1991Mar30.172254.26452@dialogic.com> Organization: Dialogic Corporation Lines: 42 In article mykes@amiga0.SF-Bay.ORG (Mike Schwartz) writes: > >Where can I get specs on uLAW? A good book on T-1 or on telephony will explain uLAW. Briefly explained uLAW is a way of encoding PCM (pulse code modulation) into 8 bits. On a T-1, voice is transmitted at 8000 samples per second, with 8 bits per sample. PCM is a complete description of every sample (ie it is NOT a delta, that is ADPCM). If you were to chart uLAW, it would look like this: MU-LAW bits Value (on a scale of +127 to -127) 10000000 +127 (peak positive level) 10101111 +80 11111111 0 01111111 -1 00000010 -126 00000010 -127 Note that the first bit is a sign bit. (0 negative, 1 positive) For positive numbers, flip the remaining 7 bits, and the value is the distance about 0. For negative numbers, flip the 7 bits add 1 and that's the distance below zero. Remember that you can't have all zeros because that would be 8 zeroes in a row, which would break a T-1 timing rule. This is basic uLAW (from memory and glancing at a book real quick, so don't exactly quote me on all this. verify with a good book). Good luck. -- uunet!dialogic!gerry | "Even a dead plant turns | Dialogic Corporation OR | over a new leaf | 300 Littleton Rd gerry@dialogic.UUCP | when the wind blows." | Parsippany, NJ 07054 | | (201)334-8450