2 * Asterisk -- An open source telephony toolkit.
4 * Copyright (C) 1999 - 2005, Digium, Inc.
6 * Mark Spencer <markster@digium.com>
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
20 * \brief u-Law to Signed linear conversion
23 #ifndef _ASTERISK_ULAW_H
24 #define _ASTERISK_ULAW_H
26 /*! Init the ulaw conversion stuff */
28 * To init the ulaw to slinear conversion stuff, this needs to be run.
30 void ast_ulaw_init(void);
32 /*! converts signed linear to mulaw */
35 extern unsigned char __ast_lin2mu
[16384];
38 extern short __ast_mulaw
[256];
40 #define AST_LIN2MU(a) (__ast_lin2mu[((unsigned short)(a)) >> 2])
41 #define AST_MULAW(a) (__ast_mulaw[(a)])
43 #endif /* _ASTERISK_ULAW_H */