| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
#include "asterisk/format_cache.h" |
| 11 |
#include "asterisk/frame.h" |
| 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 |
} |