34 #include "asterisk/module.h"
40 #define BUFFER_SAMPLES 8000
42 static unsigned char mu2a[256];
43 static unsigned char a2mu[256];
53 unsigned char *src = f->
data.
ptr;
60 *dst++ = a2mu[*src++];
69 unsigned char *src = f->
data.
ptr;
76 *dst++ = mu2a[*src++];
118 for (x=0;x<256;x++) {
A-Law to Signed linear conversion.
int datalen
actual space used in outbuf
static int ulawtoalaw_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
convert frame data and store into the buffer
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk main include file. File version handling, generic pbx functions.
union ast_trans_pvt::@213 outbuf
Descriptor of a translator.
Support for translation of data formats. translate.c.
static int unload_module(void)
standard module glue
u-Law to Signed linear conversion
#define ast_register_translator(t)
See __ast_register_translator()
int ast_unregister_translator(struct ast_translator *t)
Unregister a translator Unregisters the given tranlator.
static struct ast_translator alawtoulaw
Default structure for translators, with the basic fields and buffers, all allocated as part of the sa...
static struct ast_frame * ulaw_sample(void)
static int load_module(void)
static int alawtoulaw_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
convert frame data and store into the buffer
Data structure associated with a single frame of data.
static struct ast_frame * alaw_sample(void)
static struct ast_translator ulawtoalaw
static unsigned char a2mu[256]
static unsigned char mu2a[256]
#define ASTERISK_GPL_KEY
The text the key() function should return.
union ast_frame::@172 data
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.