Merge "app_agent_spool: Fix typo in dtmf features usage desctiption"
[asterisk/asterisk.git] / codecs / ex_codec2.h
1 /*! \file
2  * \brief 8-bit raw data
3  *
4  * Copyright (C) 2016, Alexander Traud
5  *
6  * Distributed under the terms of the GNU General Public License
7  *
8  */
9
10 #include "asterisk/format_cache.h"      /* for ast_format_codec2    */
11 #include "asterisk/frame.h"             /* for ast_frame, etc       */
12
13 static uint8_t ex_codec2[] = {
14         0xea, 0xca, 0x14, 0x85, 0x91, 0x78,
15 };
16
17 static struct ast_frame *codec2_sample(void)
18 {
19         static struct ast_frame f = {
20                 .frametype = AST_FRAME_VOICE,
21                 .datalen = sizeof(ex_codec2),
22                 .samples = CODEC2_SAMPLES,
23                 .mallocd = 0,
24                 .offset = 0,
25                 .src = __PRETTY_FUNCTION__,
26                 .data.ptr = ex_codec2,
27         };
28
29         f.subclass.format = ast_format_codec2;
30
31         return &f;
32 }