2001-12-09 00:41:43 +00:00
|
|
|
/*
|
2005-08-30 18:32:10 +00:00
|
|
|
* Asterisk -- An open source telephony toolkit.
|
2001-12-09 00:41:43 +00:00
|
|
|
*
|
2005-08-30 18:32:10 +00:00
|
|
|
* Copyright (C) 1999 - 2005, Digium, Inc.
|
|
|
|
|
*
|
|
|
|
|
* Mark Spencer <markster@digium.com>
|
2001-12-09 00:41:43 +00:00
|
|
|
*
|
2005-08-30 18:32:10 +00:00
|
|
|
* See http://www.asterisk.org for more information about
|
|
|
|
|
* the Asterisk project. Please do not directly contact
|
|
|
|
|
* any of the maintainers of this project for assistance;
|
|
|
|
|
* the project provides a web site, mailing lists and IRC
|
|
|
|
|
* channels for your use.
|
2001-12-09 00:41:43 +00:00
|
|
|
*
|
|
|
|
|
* This program is free software, distributed under the terms of
|
2005-08-30 18:32:10 +00:00
|
|
|
* the GNU General Public License Version 2. See the LICENSE file
|
|
|
|
|
* at the top of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2005-10-24 20:12:06 +00:00
|
|
|
/*! \file
|
|
|
|
|
* \brief A-Law to Signed linear conversion
|
2001-12-09 00:41:43 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _ASTERISK_ALAW_H
|
|
|
|
|
#define _ASTERISK_ALAW_H
|
|
|
|
|
|
2005-01-15 23:48:12 +00:00
|
|
|
/*! Init the ulaw conversion stuff */
|
2001-12-09 00:41:43 +00:00
|
|
|
/*!
|
|
|
|
|
* To init the ulaw to slinear conversion stuff, this needs to be run.
|
|
|
|
|
*/
|
2006-06-05 18:05:53 +00:00
|
|
|
void ast_alaw_init(void);
|
2001-12-09 00:41:43 +00:00
|
|
|
|
2005-01-15 23:48:12 +00:00
|
|
|
/*! converts signed linear to mulaw */
|
2001-12-09 00:41:43 +00:00
|
|
|
/*!
|
|
|
|
|
*/
|
|
|
|
|
extern unsigned char __ast_lin2a[8192];
|
|
|
|
|
|
2005-01-15 23:48:12 +00:00
|
|
|
/*! help */
|
2001-12-09 00:41:43 +00:00
|
|
|
extern short __ast_alaw[256];
|
|
|
|
|
|
|
|
|
|
#define AST_LIN2A(a) (__ast_lin2a[((unsigned short)(a)) >> 3])
|
2005-01-24 02:59:17 +00:00
|
|
|
#define AST_ALAW(a) (__ast_alaw[(int)(a)])
|
2001-12-09 00:41:43 +00:00
|
|
|
|
2005-08-30 18:32:10 +00:00
|
|
|
#endif /* _ASTERISK_ALAW_H */
|