[svn-commits] qwell: branch qwell/codec_consistency r110577 - in /team/qwell/codec_consiste...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Mar 21 14:55:54 CDT 2008


Author: qwell
Date: Fri Mar 21 14:55:53 2008
New Revision: 110577

URL: http://svn.digium.com/view/asterisk?view=rev&rev=110577
Log:
Get rid of the duplicates of the lin_sample() function from each of the codec modules.

Added:
    team/qwell/codec_consistency/include/asterisk/slin.h   (with props)
Removed:
    team/qwell/codec_consistency/codecs/ex_slin16.h
    team/qwell/codec_consistency/codecs/ex_slin8.h
Modified:
    team/qwell/codec_consistency/codecs/codec_a_mu.c
    team/qwell/codec_consistency/codecs/codec_adpcm.c
    team/qwell/codec_consistency/codecs/codec_alaw.c
    team/qwell/codec_consistency/codecs/codec_g722.c
    team/qwell/codec_consistency/codecs/codec_g726.c
    team/qwell/codec_consistency/codecs/codec_gsm.c
    team/qwell/codec_consistency/codecs/codec_ilbc.c
    team/qwell/codec_consistency/codecs/codec_lpc10.c
    team/qwell/codec_consistency/codecs/codec_resample.c
    team/qwell/codec_consistency/codecs/codec_speex.c
    team/qwell/codec_consistency/codecs/codec_ulaw.c

Modified: team/qwell/codec_consistency/codecs/codec_a_mu.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_a_mu.c?view=diff&rev=110577&r1=110576&r2=110577
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_a_mu.c (original)
+++ team/qwell/codec_consistency/codecs/codec_a_mu.c Fri Mar 21 14:55:53 2008
@@ -39,7 +39,6 @@
 static unsigned char a2mu[256];
 
 /* Sample frame data */
-
 #include "ex_ulaw.h"
 #include "ex_alaw.h"
 

Modified: team/qwell/codec_consistency/codecs/codec_adpcm.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_adpcm.c?view=diff&rev=110577&r1=110576&r2=110577
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_adpcm.c (original)
+++ team/qwell/codec_consistency/codecs/codec_adpcm.c Fri Mar 21 14:55:53 2008
@@ -44,8 +44,7 @@
 #define BUFFER_SAMPLES   8096	/* size for the translation buffers */
 
 /* Sample frame data */
-
-#include "ex_slin8.h"
+#include "asterisk/slin.h"
 #include "ex_adpcm.h"
 
 /*
@@ -300,22 +299,6 @@
 	return &f;
 }
 
-/*! \brief Lin_Sample */
-static struct ast_frame *lin_sample(void)
-{
-	static struct ast_frame f;
-	f.frametype = AST_FRAME_VOICE;
-	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(ex_slin8);
-	/* Assume 8000 Hz */
-	f.samples = sizeof(ex_slin8) / 2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data = ex_slin8;
-	return &f;
-}
-
 static struct ast_translator adpcmtolin = {
 	.name = "adpcmtolin",
 	.srcfmt = AST_FORMAT_ADPCM,
@@ -334,7 +317,7 @@
 	.dstfmt = AST_FORMAT_ADPCM,
 	.framein = lintoadpcm_framein,
 	.frameout = lintoadpcm_frameout,
-	.sample = lin_sample,
+	.sample = slin8_sample,
 	.desc_size = sizeof (struct adpcm_encoder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES/ 2,	/* 2 samples per byte */

Modified: team/qwell/codec_consistency/codecs/codec_alaw.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_alaw.c?view=diff&rev=110577&r1=110576&r2=110577
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_alaw.c (original)
+++ team/qwell/codec_consistency/codecs/codec_alaw.c Fri Mar 21 14:55:53 2008
@@ -36,8 +36,7 @@
 #define BUFFER_SAMPLES   8096	/* size for the translation buffers */
 
 /* Sample frame data */
-
-#include "ex_slin8.h"
+#include "asterisk/slin.h"
 #include "ex_alaw.h"
 
 /*! \brief decode frame into lin and fill output buffer. */
@@ -87,21 +86,6 @@
 	return &f;
 }
 
-/*! \brief Lin_Sample */
-static struct ast_frame *lin_sample(void)
-{
-	static struct ast_frame f;
-	f.frametype = AST_FRAME_VOICE;
-	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(ex_slin8);
-	f.samples = sizeof(ex_slin8) / 2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data = ex_slin8;
-	return &f;
-}
-
 static struct ast_translator alawtolin = {
 	.name = "alawtolin",
 	.srcfmt = AST_FORMAT_ALAW,
@@ -118,7 +102,7 @@
 	.srcfmt = AST_FORMAT_SLINEAR,
 	.dstfmt = AST_FORMAT_ALAW,
 	.framein = lintoalaw_framein,
-	.sample = lin_sample,
+	.sample = slin8_sample,
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES,
 };

Modified: team/qwell/codec_consistency/codecs/codec_g722.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_g722.c?view=diff&rev=110577&r1=110576&r2=110577
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_g722.c (original)
+++ team/qwell/codec_consistency/codecs/codec_g722.c Fri Mar 21 14:55:53 2008
@@ -46,11 +46,10 @@
 #define BUFFER_SAMPLES   8096	/* size for the translation buffers */
 #define BUF_SHIFT	5
 
+#include "g722/g722.h"
+
 /* Sample frame data */
-
-#include "g722/g722.h"
-#include "ex_slin8.h"
-#include "ex_slin16.h"
+#include "asterisk/slin.h"
 #include "ex_g722.h"
 
 struct g722_encoder_pvt {
@@ -142,34 +141,6 @@
 		.samples = sizeof(ex_g722) * 2,
 		.src = __PRETTY_FUNCTION__,
 		.data = ex_g722,
-	};
-
-	return &f;
-}
-
-static struct ast_frame *lin_sample (void)
-{
-	static struct ast_frame f = {
-		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR,
-		.datalen = sizeof(ex_slin8),
-		.samples = sizeof(ex_slin8) / sizeof(ex_slin8[0]),
-		.src = __PRETTY_FUNCTION__,
-		.data = ex_slin8,
-	};
-
-	return &f;
-}
-
-static struct ast_frame *lin16_sample (void)
-{
-	static struct ast_frame f = {
-		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR16,
-		.datalen = sizeof(ex_slin16),
-		.samples = sizeof(ex_slin16) / sizeof(ex_slin16[0]),
-		.src = __PRETTY_FUNCTION__,
-		.data = ex_slin16,
 	};
 
 	return &f;
@@ -194,7 +165,7 @@
 	.dstfmt = AST_FORMAT_G722,
 	.newpvt = lintog722_new,	/* same for both directions */
 	.framein = lintog722_framein,
-	.sample = lin_sample,
+	.sample = slin8_sample,
 	.desc_size = sizeof(struct g722_encoder_pvt),
 	.buffer_samples = BUFFER_SAMPLES * 2,
 	.buf_size = BUFFER_SAMPLES,
@@ -219,7 +190,7 @@
 	.dstfmt = AST_FORMAT_G722,
 	.newpvt = lin16tog722_new,	/* same for both directions */
 	.framein = lintog722_framein,
-	.sample = lin16_sample,
+	.sample = slin16_sample,
 	.desc_size = sizeof(struct g722_encoder_pvt),
 	.buffer_samples = BUFFER_SAMPLES * 2,
 	.buf_size = BUFFER_SAMPLES,

Modified: team/qwell/codec_consistency/codecs/codec_g726.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_g726.c?view=diff&rev=110577&r1=110576&r2=110577
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_g726.c (original)
+++ team/qwell/codec_consistency/codecs/codec_g726.c Fri Mar 21 14:55:53 2008
@@ -58,8 +58,7 @@
 #define BUF_SHIFT	5
 
 /* Sample frame data */
-
-#include "ex_slin8.h"
+#include "asterisk/slin.h"
 #include "ex_g726.h"
 
 /*
@@ -800,20 +799,6 @@
 	return &f;
 }
 
-static struct ast_frame *lin_sample (void)
-{
-	static struct ast_frame f = {
-		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR,
-		.datalen = sizeof(ex_slin8),
-		.samples = sizeof(ex_slin8) / 2,	/* 1 sample per 2 bytes */
-		.src = __PRETTY_FUNCTION__,
-		.data = ex_slin8,
-	};
-
-	return &f;
-}
-
 static struct ast_translator g726tolin = {
 	.name = "g726tolin",
 	.srcfmt = AST_FORMAT_G726,
@@ -833,7 +818,7 @@
 	.dstfmt = AST_FORMAT_G726,
 	.newpvt = lintog726_new,	/* same for both directions */
 	.framein = lintog726_framein,
-	.sample = lin_sample,
+	.sample = slin8_sample,
 	.desc_size = sizeof(struct g726_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES/2,
@@ -858,7 +843,7 @@
 	.dstfmt = AST_FORMAT_G726_AAL2,
 	.newpvt = lintog726_new,	/* same for both directions */
 	.framein = lintog726aal2_framein,
-	.sample = lin_sample,
+	.sample = slin8_sample,
 	.desc_size = sizeof(struct g726_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES / 2,

Modified: team/qwell/codec_consistency/codecs/codec_gsm.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_gsm.c?view=diff&rev=110577&r1=110576&r2=110577
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_gsm.c (original)
+++ team/qwell/codec_consistency/codecs/codec_gsm.c Fri Mar 21 14:55:53 2008
@@ -48,7 +48,7 @@
 #include "../formats/msgsm.h"
 
 /* Sample frame data */
-#include "ex_slin8.h"
+#include "asterisk/slin.h"
 #include "ex_gsm.h"
 
 #define BUFFER_SAMPLES	8000
@@ -66,21 +66,6 @@
 	struct gsm_translator_pvt *tmp = pvt->pvt;
 	
 	return (tmp->gsm = gsm_create()) ? 0 : -1;
-}
-
-static struct ast_frame *lin_sample(void)
-{
-	static struct ast_frame f;
-	f.frametype = AST_FRAME_VOICE;
-	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(ex_slin8);
-	/* Assume 8000 Hz */
-	f.samples = sizeof(ex_slin8)/2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data = ex_slin8;
-	return &f;
 }
 
 static struct ast_frame *gsm_sample(void)
@@ -218,7 +203,7 @@
 	.framein = lintogsm_framein,
 	.frameout = lintogsm_frameout,
 	.destroy = gsm_destroy_stuff,
-	.sample = lin_sample,
+	.sample = slin8_sample,
 	.desc_size = sizeof (struct gsm_translator_pvt ),
 	.buf_size = (BUFFER_SAMPLES * GSM_FRAME_LEN + GSM_SAMPLES - 1)/GSM_SAMPLES,
 };

Modified: team/qwell/codec_consistency/codecs/codec_ilbc.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_ilbc.c?view=diff&rev=110577&r1=110576&r2=110577
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_ilbc.c (original)
+++ team/qwell/codec_consistency/codecs/codec_ilbc.c Fri Mar 21 14:55:53 2008
@@ -37,7 +37,7 @@
 #include "ilbc/iLBC_decode.h"
 
 /* Sample frame data */
-#include "ex_slin8.h"
+#include "asterisk/slin.h"
 #include "ex_ilbc.h"
 
 #define USE_ILBC_ENHANCER	0
@@ -71,20 +71,6 @@
 	initDecode(&tmp->dec, ILBC_MS, USE_ILBC_ENHANCER);
 
 	return 0;
-}
-
-static struct ast_frame *lin_sample(void)
-{
-	static struct ast_frame f;
-	f.frametype = AST_FRAME_VOICE;
-	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(ex_slin8);
-	f.samples = sizeof(ex_slin8)/2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data = ex_slin8;
-	return &f;
 }
 
 static struct ast_frame *ilbc_sample(void)
@@ -203,7 +189,7 @@
 	.newpvt = lintoilbc_new,
 	.framein = lintoilbc_framein,
 	.frameout = lintoilbc_frameout,
-	.sample = lin_sample,
+	.sample = slin8_sample,
 	.desc_size = sizeof(struct ilbc_coder_pvt),
 	.buf_size = (BUFFER_SAMPLES * ILBC_FRAME_LEN + ILBC_SAMPLES - 1) / ILBC_SAMPLES,
 };

Modified: team/qwell/codec_consistency/codecs/codec_lpc10.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_lpc10.c?view=diff&rev=110577&r1=110576&r2=110577
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_lpc10.c (original)
+++ team/qwell/codec_consistency/codecs/codec_lpc10.c Fri Mar 21 14:55:53 2008
@@ -39,7 +39,7 @@
 #include "lpc10/lpc10.h"
 
 /* Sample frame data */
-#include "ex_slin8.h"
+#include "asterisk/slin.h"
 #include "ex_lpc10.h"
 
 /* We use a very strange format here...  I have no idea why...  The frames are 180
@@ -73,21 +73,6 @@
 	struct lpc10_coder_pvt *tmp = pvt->pvt;
 
 	return (tmp->lpc10.dec = create_lpc10_decoder_state()) ? 0 : -1;
-}
-
-static struct ast_frame *lin_sample(void)
-{
-	static struct ast_frame f;
-	f.frametype = AST_FRAME_VOICE;
-	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(ex_slin8);
-	/* Assume 8000 Hz */
-	f.samples = LPC10_SAMPLES_PER_FRAME;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data = ex_slin8;
-	return &f;
 }
 
 static struct ast_frame *lpc10_sample(void)
@@ -244,7 +229,7 @@
 	.framein = lintolpc10_framein,
 	.frameout = lintolpc10_frameout,
 	.destroy = lpc10_destroy,
-	.sample = lin_sample,
+	.sample = slin8_sample,
 	.desc_size = sizeof(struct lpc10_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = LPC10_BYTES_IN_COMPRESSED_FRAME * (1 + BUFFER_SAMPLES / LPC10_SAMPLES_PER_FRAME),

Modified: team/qwell/codec_consistency/codecs/codec_resample.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_resample.c?view=diff&rev=110577&r1=110576&r2=110577
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_resample.c (original)
+++ team/qwell/codec_consistency/codecs/codec_resample.c Fri Mar 21 14:55:53 2008
@@ -41,8 +41,7 @@
 #include "asterisk/translate.h"
 #include "asterisk/libresample.h"
 
-#include "ex_slin8.h"
-#include "ex_slin16.h"
+#include "asterisk/slin.h"
 
 #define RESAMPLER_QUALITY 0
 
@@ -159,34 +158,6 @@
 	float resample_factor = resamp_pvt->resample_factor;
 
 	return resample_frame(pvt, resampler, resample_factor, f);
-}
-
-static struct ast_frame *slin16_sample(void)
-{
-	static struct ast_frame f = {
-		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR16,
-		.datalen = sizeof(ex_slin16),
-		.samples = sizeof(ex_slin16) / sizeof(ex_slin16[0]),
-		.src = __PRETTY_FUNCTION__,
-		.data = ex_slin16,
-	};
-
-	return &f;
-}
-
-static struct ast_frame *slin8_sample(void)
-{
-	static struct ast_frame f = {
-		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR,
-		.datalen = sizeof(ex_slin8),
-		.samples = sizeof(ex_slin8) / sizeof(ex_slin8[0]),
-		.src = __PRETTY_FUNCTION__,
-		.data = ex_slin8,
-	};
-
-	return &f;
 }
 
 static struct ast_translator slin16_to_slin8 = {

Modified: team/qwell/codec_consistency/codecs/codec_speex.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_speex.c?view=diff&rev=110577&r1=110576&r2=110577
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_speex.c (original)
+++ team/qwell/codec_consistency/codecs/codec_speex.c Fri Mar 21 14:55:53 2008
@@ -53,7 +53,7 @@
 #include "asterisk/utils.h"
 
 /* Sample frame data */
-#include "ex_slin8.h"
+#include "asterisk/slin.h"
 #include "ex_speex.h"
 
 /* codec variables */
@@ -151,21 +151,6 @@
 		speex_decoder_ctl(tmp->speex, SPEEX_SET_ENH, &enhancement);
 
 	return 0;
-}
-
-static struct ast_frame *lin_sample(void)
-{
-	static struct ast_frame f;
-	f.frametype = AST_FRAME_VOICE;
-	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(ex_slin8);
-	/* Assume 8000 Hz */
-	f.samples = sizeof(ex_slin8)/2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data = ex_slin8;
-	return &f;
 }
 
 static struct ast_frame *speex_sample(void)
@@ -360,7 +345,7 @@
 	.framein = lintospeex_framein,
 	.frameout = lintospeex_frameout,
 	.destroy = lintospeex_destroy,
-	.sample = lin_sample,
+	.sample = slin8_sample,
 	.desc_size = sizeof(struct speex_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES * 2, /* XXX maybe a lot less ? */

Modified: team/qwell/codec_consistency/codecs/codec_ulaw.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_ulaw.c?view=diff&rev=110577&r1=110576&r2=110577
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_ulaw.c (original)
+++ team/qwell/codec_consistency/codecs/codec_ulaw.c Fri Mar 21 14:55:53 2008
@@ -36,8 +36,7 @@
 #define BUFFER_SAMPLES   8096	/* size for the translation buffers */
 
 /* Sample frame data */
-
-#include "ex_slin8.h"
+#include "asterisk/slin.h"
 #include "ex_ulaw.h"
 
 /*! \brief convert and store samples in outbuf */
@@ -89,25 +88,6 @@
 }
 
 /*!
- * \brief Lin_Sample
- */
-
-static struct ast_frame *lin_sample(void)
-{
-	static struct ast_frame f;
-	f.frametype = AST_FRAME_VOICE;
-	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(ex_slin8);
-	/* Assume 8000 Hz */
-	f.samples = sizeof(ex_slin8) / 2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data = ex_slin8;
-	return &f;
-}
-
-/*!
  * \brief The complete translator for ulawToLin.
  */
 
@@ -131,7 +111,7 @@
 	.srcfmt = AST_FORMAT_SLINEAR,
 	.dstfmt = AST_FORMAT_ULAW,
 	.framein = lintoulaw_framein,
-	.sample = lin_sample,
+	.sample = slin8_sample,
 	.buf_size = BUFFER_SAMPLES,
 	.buffer_samples = BUFFER_SAMPLES,
 };

Added: team/qwell/codec_consistency/include/asterisk/slin.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/include/asterisk/slin.h?view=auto&rev=110577
==============================================================================
--- team/qwell/codec_consistency/include/asterisk/slin.h (added)
+++ team/qwell/codec_consistency/include/asterisk/slin.h Fri Mar 21 14:55:53 2008
@@ -1,0 +1,81 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2007, Digium, Inc.
+ *
+ * Russell Bryant <russell at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+static signed short ex_slin8[] = {
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+};
+
+static signed short ex_slin16[] = {
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+};
+
+static inline struct ast_frame *slin8_sample(void)
+{
+	static struct ast_frame f = {
+		.frametype = AST_FRAME_VOICE,
+		.subclass = AST_FORMAT_SLINEAR,
+		.datalen = sizeof(ex_slin8),
+		.samples = sizeof(ex_slin8) / sizeof(ex_slin8[0]),
+		.src = __PRETTY_FUNCTION__,
+		.data = ex_slin8,
+	};
+
+	return &f;
+}
+
+static inline struct ast_frame *slin16_sample(void)
+{
+	static struct ast_frame f = {
+		.frametype = AST_FRAME_VOICE,
+		.subclass = AST_FORMAT_SLINEAR16,
+		.datalen = sizeof(ex_slin16),
+		.samples = sizeof(ex_slin16) / sizeof(ex_slin16[0]),
+		.src = __PRETTY_FUNCTION__,
+		.data = ex_slin16,
+	};
+
+	return &f;
+}

Propchange: team/qwell/codec_consistency/include/asterisk/slin.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency/include/asterisk/slin.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency/include/asterisk/slin.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the svn-commits mailing list