Main Page   Compound List   File List   Compound Members   File Members  

ulaw.h

Go to the documentation of this file.
00001 /*
00002 
00003     Mu-law to linear conversion
00004 
00005 */
00006 
00007 extern const unsigned short u2s[];
00008 extern const unsigned char s2u[];
00009 
00010 #define audio_u2s(x)  ((short) (u2s[(unsigned  char) (x)]))
00011 #define audio_s2u(x)  (s2u[((unsigned short) (x)) >> 3])
00012 
00013 /* Note that 8 bit PCM samples are unsigned, with 0x80
00014    representing the zero crossing and 0x0 and 0xFF the
00015    extrema. */
00016 
00017 #define audio_u2c(x)   (0x80 + ((unsigned char) (u2s[(unsigned  char) (x)] >> 8)))
00018 #define audio_c2u(x)  (s2u[(((short) ((((char) (x)) - 0x80) & 0xFF)) << 5) + 0xF])

Generated on Tue Feb 10 08:26:35 2004 for Speak-FreelyforWindows by doxygen1.2.18