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

alaw.c File Reference

#include <asterisk/alaw.h>

Include dependency graph for alaw.c:

Include dependency graph

Go to the source code of this file.

Defines

#define AMI_MASK   0x55

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 AMI_MASK   0x55
 

Definition at line 16 of file alaw.c.


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

Referenced by ast_alaw_init().

unsigned char __ast_lin2a[8192]
 

converts signed linear to mulaw

Definition at line 65 of file alaw.c.

Referenced by ast_alaw_init().


Generated on Sat Jun 12 16:41:01 2004 for Asterisk by doxygen 1.3.7