Mon Jan 30 13:29:06 2012

Asterisk developer's documentation


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)])
#define AST_LIN2A (  )     (__ast_lin2a[((unsigned short)(a)) >> 3])

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 84 of file alaw.c.

References alaw2linear(), and linear2alaw().

Referenced by main().

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


Variable Documentation

short __ast_alaw[256]

help

Definition at line 82 of file alaw.c.

unsigned char __ast_lin2a[8192]

converts signed linear to mulaw

Definition at line 81 of file alaw.c.


Generated on 30 Jan 2012 for Asterisk - the Open Source PBX by  doxygen 1.6.1