Wed Jan 8 2020 09:49:47

Asterisk developer's documentation


ex_alaw.h
Go to the documentation of this file.
1 /*! \file
2  * \brief 8-bit data
3  *
4  * Copyright (C) 2008, Digium, Inc.
5  *
6  * Distributed under the terms of the GNU General Public License
7  *
8  */
9 
10 static uint8_t ex_alaw[] = {
11  0x00, 0x03, 0x06, 0x09, 0x0c, 0x0f, 0x12, 0x15,
12  0x10, 0x18, 0x1b, 0x1e, 0x21, 0x24, 0x27, 0x2a,
13  0x20, 0x2d, 0x30, 0x33, 0x36, 0x39, 0x3c, 0x3f,
14  0x30, 0x42, 0x45, 0x48, 0x4b, 0x4e, 0x51, 0x54,
15  0x40, 0x57, 0x5a, 0x5d, 0x60, 0x63, 0x66, 0x69,
16  0x50, 0x6c, 0x6f, 0x72, 0x75, 0x78, 0x7b, 0x7e,
17  0x60, 0x81, 0x84, 0x87, 0x8a, 0x8d, 0x90, 0x93,
18  0x70, 0x96, 0x99, 0x9c, 0x9f, 0xa2, 0xa5, 0xa8,
19  0x80, 0xab, 0xae, 0xb1, 0xb4, 0xb7, 0xba, 0xbd,
20  0x90, 0xc0, 0xc3, 0xc6, 0xc9, 0xcc, 0xcf, 0xd2,
21 };
22 
23 static struct ast_frame *alaw_sample(void)
24 {
25  static struct ast_frame f = {
27  .subclass.codec = AST_FORMAT_ALAW,
28  .datalen = sizeof(ex_alaw),
30  .mallocd = 0,
31  .offset = 0,
32  .src = __PRETTY_FUNCTION__,
33  .data.ptr = ex_alaw,
34  };
35 
36  return &f;
37 }
#define ARRAY_LEN(a)
Definition: isdn_lib.c:42
#define AST_FORMAT_ALAW
Definition: frame.h:248
static uint8_t ex_alaw[]
Definition: ex_alaw.h:10
static struct ast_format f[]
Definition: format_g726.c:181
Data structure associated with a single frame of data.
Definition: frame.h:142
static struct ast_frame * alaw_sample(void)
Definition: ex_alaw.h:23
enum ast_frame_type frametype
Definition: frame.h:144
int samples
Definition: frame.h:150