Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

alaw.h File Reference

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.

Referenced by ast_dsp_process().

#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.

References __ast_alaw, and __ast_lin2a.

Referenced by main().

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 29 of file alaw.h.

Referenced by ast_alaw_init().

unsigned char __ast_lin2a[8192]
 

converts signed linear to mulaw

Definition at line 26 of file alaw.h.

Referenced by ast_alaw_init().


Generated on Fri Oct 31 07:05:09 2003 for Asterisk by doxygen 1.3.4