Mon Mar 20 08:25:45 2006

Asterisk developer's documentation


Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

alaw.h File Reference

A-Law to Signed linear conversion. More...

Go to the source code of this file.

Defines

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

Functions

void ast_alaw_init (void)

Variables

short __ast_alaw [256]
unsigned char __ast_lin2a [8192]


Detailed Description

A-Law to Signed linear conversion.

Definition in file alaw.h.


Define Documentation

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

Definition at line 41 of file alaw.h.

Referenced by alawtolin_framein(), ast_dsp_process(), fill_rxgain(), fill_txgain(), and load_module().

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

Definition at line 40 of file alaw.h.

Referenced by fill_rxgain(), fill_txgain(), lintoalaw_framein(), and load_module().


Function Documentation

void ast_alaw_init void   ) 
 

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

Definition at line 83 of file alaw.c.

References __ast_alaw, __ast_lin2a, alaw2linear(), and linear2alaw().

Referenced by main().

00084 {
00085    int i;
00086    /* 
00087     *  Set up mu-law conversion table
00088     */
00089    for(i = 0;i < 256;i++)
00090       {
00091            __ast_alaw[i] = alaw2linear(i);
00092       }
00093      /* set up the reverse (mu-law) conversion table */
00094    for(i = -32768; i < 32768; i++)
00095       {
00096       __ast_lin2a[((unsigned short)i) >> 3] = linear2alaw(i);
00097       }
00098 
00099 }


Variable Documentation

short __ast_alaw[256]
 

help

Definition at line 81 of file alaw.c.

Referenced by ast_alaw_init().

unsigned char __ast_lin2a[8192]
 

Definition at line 80 of file alaw.c.

Referenced by ast_alaw_init().


Generated on Mon Mar 20 08:25:45 2006 for Asterisk - the Open Source PBX by  doxygen 1.3.9.1