alaw.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define AST_LIN2A(a)   (__ast_lin2a[((unsigned short)(a)) >> 3])
#define AST_ALAW(a)   (__ast_alaw[(a)])

Functions

void ast_alaw_init (void)
 Init the ulaw conversion stuff.

Variables

unsigned char __ast_lin2a [8192]
 converts signed linear to mulaw
short __ast_alaw [256]
 help


Define Documentation

#define AST_ALAW (  )     (__ast_alaw[(a)])

Definition at line 32 of file alaw.h.

#define AST_LIN2A (  )     (__ast_lin2a[((unsigned short)(a)) >> 3])

Definition at line 31 of file alaw.h.


Function Documentation

void ast_alaw_init ( void   ) 

Init the ulaw conversion stuff.

To init the ulaw to slinear conversion stuff, this needs to be run.

Definition at line 68 of file alaw.c.

00069 {
00070    int i;
00071    /* 
00072     *  Set up mu-law conversion table
00073     */
00074    for(i = 0;i < 256;i++)
00075       {
00076            __ast_alaw[i] = alaw2linear(i);
00077       }
00078      /* set up the reverse (mu-law) conversion table */
00079    for(i = -32768; i < 32768; i++)
00080       {
00081       __ast_lin2a[((unsigned short)i) >> 3] = linear2alaw(i);
00082       }
00083 
00084 }


Variable Documentation

short __ast_alaw[256]

help

Definition at line 66 of file alaw.c.

unsigned char __ast_lin2a[8192]

converts signed linear to mulaw

Definition at line 65 of file alaw.c.


Generated on Wed Oct 28 17:00:48 2009 for Asterisk by  doxygen 1.5.6