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