Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff should...
[asterisk-bristuff.git] / include / asterisk / alaw.h
blob44b3bad86ead9e7343dcc9f68356602cbe8956c8
1 /*
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.
19 /*! \file
20 * \brief A-Law to Signed linear conversion
23 #ifndef _ASTERISK_ALAW_H
24 #define _ASTERISK_ALAW_H
26 /*! Init the ulaw conversion stuff */
27 /*!
28 * To init the ulaw to slinear conversion stuff, this needs to be run.
30 void ast_alaw_init(void);
32 /*! converts signed linear to mulaw */
33 /*!
35 extern unsigned char __ast_lin2a[8192];
37 /*! help */
38 extern short __ast_alaw[256];
40 #define AST_LIN2A(a) (__ast_lin2a[((unsigned short)(a)) >> 3])
41 #define AST_ALAW(a) (__ast_alaw[(int)(a)])
43 #endif /* _ASTERISK_ALAW_H */