aboutsummaryrefslogtreecommitdiffstats
path: root/codecs/ex_g726.h
diff options
context:
space:
mode:
Diffstat (limited to 'codecs/ex_g726.h')
-rw-r--r--codecs/ex_g726.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/codecs/ex_g726.h b/codecs/ex_g726.h
new file mode 100644
index 000000000..d74844d0a
--- /dev/null
+++ b/codecs/ex_g726.h
@@ -0,0 +1,32 @@
+/*! \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,
+ .subclass = AST_FORMAT_G726,
+ .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,
+ };
+
+ return &f;
+}