00001 /* 00002 * Asterisk -- An open source telephony toolkit. 00003 * 00004 * Copyright (C) 1999 - 2005, Digium, Inc. 00005 * 00006 * Mark Spencer <markster@digium.com> 00007 * 00008 * See http://www.asterisk.org for more information about 00009 * the Asterisk project. Please do not directly contact 00010 * any of the maintainers of this project for assistance; 00011 * the project provides a web site, mailing lists and IRC 00012 * channels for your use. 00013 * 00014 * This program is free software, distributed under the terms of 00015 * the GNU General Public License Version 2. See the LICENSE file 00016 * at the top of the source tree. 00017 */ 00018 00019 /*! \file 00020 * \brief u-Law to Signed linear conversion 00021 */ 00022 00023 #ifndef _ASTERISK_ULAW_H 00024 #define _ASTERISK_ULAW_H 00025 00026 /*! Init the ulaw conversion stuff */ 00027 /*! 00028 * To init the ulaw to slinear conversion stuff, this needs to be run. 00029 */ 00030 void ast_ulaw_init(void); 00031 00032 /*! converts signed linear to mulaw */ 00033 /*! 00034 */ 00035 extern unsigned char __ast_lin2mu[16384]; 00036 00037 /*! help */ 00038 extern short __ast_mulaw[256]; 00039 00040 #define AST_LIN2MU(a) (__ast_lin2mu[((unsigned short)(a)) >> 2]) 00041 #define AST_MULAW(a) (__ast_mulaw[(a)]) 00042 00043 #endif /* _ASTERISK_ULAW_H */