forked from asterisk/asterisk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex_g726.h
33 lines (29 loc) · 772 Bytes
/
ex_g726.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*! \file
* \brief 4-bit G.726 data
*
* Copyright (C) 2008, Digium, Inc.
*
* Distributed under the terms of the GNU General Public License
*
*/
static uint8_t ex_g726[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static struct ast_frame *g726_sample(void)
{
static struct ast_frame f = {
.frametype = AST_FRAME_VOICE,
.datalen = sizeof(ex_g726),
.samples = ARRAY_LEN(ex_g726) * 2, /* 2 samples per byte */
.mallocd = 0,
.offset = 0,
.src = __PRETTY_FUNCTION__,
.data.ptr = ex_g726,
};
f.subclass.format = ast_format_g726;
return &f;
}