Debian Codegraph @

Xopus/codecs/ex_opus.h

raw symbols SCIP
1 /*! \file
2 * \brief 8-bit data
3 *
4 * Copyright (C) 2014, Lorenzo Miniero
5 *
6 * Distributed under the terms of the GNU General Public License
7 *
8 */
9
10 #include "asterisk/format_cache.h" /* for ast_format_opus */
11 #include "asterisk/frame.h" /* for ast_frame, etc */
12
13 /* Opus, a 20ms sample */
14 static uint8_t ex_opus[] = {
15 0x4b, 0x41, 0x25, 0x0b, 0xe4, 0x55, 0xc6, 0x74,
16 0xda, 0xbb, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
17 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
18 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
19 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
20 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21 };
22
23 static struct ast_frame *opus_sample(void)
24 {
25 static struct ast_frame f = {
26 .frametype = AST_FRAME_VOICE,
27 .datalen = sizeof(ex_opus),
28 .samples = OPUS_SAMPLES,
29 .mallocd = 0,
30 .offset = 0,
31 .src = __PRETTY_FUNCTION__,
32 .data.ptr = ex_opus,
33 };
34
35 f.subclass.format = ast_format_opus;
36
37 return &f;
38 }