[asterisk-commits] qwell: branch qwell/codec_consistency_fix r147142 - in /team/qwell/codec_cons...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 7 10:33:40 CDT 2008


Author: qwell
Date: Tue Oct  7 10:33:39 2008
New Revision: 147142

URL: http://svn.digium.com/view/asterisk?view=rev&rev=147142
Log:
Commit the rest.  This should bring it up to date (but it likely doesn't compile still)

Added:
    team/qwell/codec_consistency_fix/codecs/ex_adpcm.h   (with props)
    team/qwell/codec_consistency_fix/codecs/ex_alaw.h   (with props)
    team/qwell/codec_consistency_fix/codecs/ex_g722.h   (with props)
    team/qwell/codec_consistency_fix/codecs/ex_g726.h   (with props)
    team/qwell/codec_consistency_fix/codecs/ex_gsm.h   (with props)
    team/qwell/codec_consistency_fix/codecs/ex_ilbc.h   (with props)
    team/qwell/codec_consistency_fix/codecs/ex_lpc10.h   (with props)
    team/qwell/codec_consistency_fix/codecs/ex_slin16.h   (with props)
    team/qwell/codec_consistency_fix/codecs/ex_slin8.h   (with props)
    team/qwell/codec_consistency_fix/codecs/ex_speex.h   (with props)
    team/qwell/codec_consistency_fix/codecs/ex_ulaw.h   (with props)
    team/qwell/codec_consistency_fix/include/asterisk/slin.h   (with props)
Modified:
    team/qwell/codec_consistency_fix/codecs/codec_a_mu.c
    team/qwell/codec_consistency_fix/codecs/codec_adpcm.c
    team/qwell/codec_consistency_fix/codecs/codec_alaw.c
    team/qwell/codec_consistency_fix/codecs/codec_g722.c
    team/qwell/codec_consistency_fix/codecs/codec_g726.c
    team/qwell/codec_consistency_fix/codecs/codec_gsm.c
    team/qwell/codec_consistency_fix/codecs/codec_ilbc.c
    team/qwell/codec_consistency_fix/codecs/codec_lpc10.c
    team/qwell/codec_consistency_fix/codecs/codec_resample.c
    team/qwell/codec_consistency_fix/codecs/codec_speex.c
    team/qwell/codec_consistency_fix/codecs/codec_ulaw.c

Modified: team/qwell/codec_consistency_fix/codecs/codec_a_mu.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_a_mu.c?view=diff&rev=147142&r1=147141&r2=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_a_mu.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_a_mu.c Tue Oct  7 10:33:39 2008
@@ -39,9 +39,8 @@
 static unsigned char a2mu[256];
 
 /* Sample frame data */
-
-#include "ulaw_ex.h"
-#include "alaw_ex.h"
+#include "ex_ulaw.h"
+#include "ex_alaw.h"
 
 /*! \brief convert frame data and store into the buffer */
 static int alawtoulaw_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
@@ -83,12 +82,12 @@
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ALAW;
-	f.datalen = sizeof(alaw_ex);
-	f.samples = sizeof(alaw_ex);
+	f.datalen = sizeof(ex_alaw);
+	f.samples = sizeof(ex_alaw);
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = alaw_ex; /* XXX what ? */
+	f.data.ptr = ex_alaw; /* XXX what ? */
 	return &f;
 }
 
@@ -97,12 +96,12 @@
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ULAW;
-	f.datalen = sizeof(ulaw_ex);
-	f.samples = sizeof(ulaw_ex);
+	f.datalen = sizeof(ex_ulaw);
+	f.samples = sizeof(ex_ulaw);
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = ulaw_ex;
+	f.data.ptr = ex_ulaw;
 	return &f;
 }
 

Modified: team/qwell/codec_consistency_fix/codecs/codec_adpcm.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_adpcm.c?view=diff&rev=147142&r1=147141&r2=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_adpcm.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_adpcm.c Tue Oct  7 10:33:39 2008
@@ -44,9 +44,8 @@
 #define BUFFER_SAMPLES   8096	/* size for the translation buffers */
 
 /* Sample frame data */
-
-#include "slin_ex.h"
-#include "adpcm_ex.h"
+#include "asterisk/slin.h"
+#include "ex_adpcm.h"
 
 /*
  * Step size index shift table 
@@ -291,28 +290,12 @@
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ADPCM;
-	f.datalen = sizeof(adpcm_ex);
-	f.samples = sizeof(adpcm_ex) * 2;
+	f.datalen = sizeof(ex_adpcm);
+	f.samples = sizeof(ex_adpcm) * 2;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = adpcm_ex;
-	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(slin8_ex);
-	/* Assume 8000 Hz */
-	f.samples = sizeof(slin8_ex) / 2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin8_ex;
+	f.data.ptr = ex_adpcm;
 	return &f;
 }
 
@@ -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_fix/codecs/codec_alaw.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_alaw.c?view=diff&rev=147142&r1=147141&r2=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_alaw.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_alaw.c Tue Oct  7 10:33:39 2008
@@ -35,10 +35,9 @@
 
 #define BUFFER_SAMPLES   8096	/* size for the translation buffers */
 
-/* Sample frame data (Mu data is okay) */
-
-#include "slin_ex.h"
-#include "alaw_ex.h"
+/* Sample frame data */
+#include "asterisk/slin.h"
+#include "ex_alaw.h"
 
 /*! \brief decode frame into lin and fill output buffer. */
 static int alawtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
@@ -78,27 +77,12 @@
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ALAW;
-	f.datalen = sizeof(alaw_ex);
-	f.samples = sizeof(alaw_ex);
+	f.datalen = sizeof(ex_alaw);
+	f.samples = sizeof(ex_alaw);
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = alaw_ex;
-	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(slin8_ex);
-	f.samples = sizeof(slin8_ex) / 2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin8_ex;
+	f.data.ptr = ex_alaw;
 	return &f;
 }
 
@@ -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_fix/codecs/codec_g722.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_g722.c?view=diff&rev=147142&r1=147141&r2=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_g722.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_g722.c Tue Oct  7 10:33:39 2008
@@ -46,12 +46,11 @@
 #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 "slin_ex.h"
-#include "slin16_ex.h"
-#include "g722_ex.h"
+#include "asterisk/slin.h"
+#include "ex_g722.h"
 
 struct g722_encoder_pvt {
 	g722_encode_state_t g722;
@@ -138,38 +137,10 @@
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_G722,
-		.datalen = sizeof(g722_ex),
-		.samples = sizeof(g722_ex) * 2,
+		.datalen = sizeof(ex_g722),
+		.samples = sizeof(ex_g722) * 2,
 		.src = __PRETTY_FUNCTION__,
-		.data.ptr = g722_ex,
-	};
-
-	return &f;
-}
-
-static struct ast_frame *lin_sample (void)
-{
-	static struct ast_frame f = {
-		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR,
-		.datalen = sizeof(slin8_ex),
-		.samples = ARRAY_LEN(slin8_ex),
-		.src = __PRETTY_FUNCTION__,
-		.data.ptr = slin8_ex,
-	};
-
-	return &f;
-}
-
-static struct ast_frame *lin16_sample (void)
-{
-	static struct ast_frame f = {
-		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR16,
-		.datalen = sizeof(slin16_ex),
-		.samples = ARRAY_LEN(slin16_ex),
-		.src = __PRETTY_FUNCTION__,
-		.data.ptr = slin16_ex,
+		.data.ptr = ex_g722,
 	};
 
 	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_fix/codecs/codec_g726.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_g726.c?view=diff&rev=147142&r1=147141&r2=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_g726.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_g726.c Tue Oct  7 10:33:39 2008
@@ -58,9 +58,8 @@
 #define BUF_SHIFT	5
 
 /* Sample frame data */
-
-#include "slin_ex.h"
-#include "g726_ex.h"
+#include "asterisk/slin.h"
+#include "ex_g726.h"
 
 /*
  * The following is the definition of the state structure
@@ -791,24 +790,10 @@
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_G726,
-		.datalen = sizeof(g726_ex),
-		.samples = sizeof(g726_ex) * 2,	/* 2 samples per byte */
+		.datalen = sizeof(ex_g726),
+		.samples = sizeof(ex_g726) * 2,	/* 2 samples per byte */
 		.src = __PRETTY_FUNCTION__,
-		.data.ptr = g726_ex,
-	};
-
-	return &f;
-}
-
-static struct ast_frame *lin_sample (void)
-{
-	static struct ast_frame f = {
-		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR,
-		.datalen = sizeof(slin8_ex),
-		.samples = sizeof(slin8_ex) / 2,	/* 1 sample per 2 bytes */
-		.src = __PRETTY_FUNCTION__,
-		.data.ptr = slin8_ex,
+		.data.ptr = ex_g726,
 	};
 
 	return &f;
@@ -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_fix/codecs/codec_gsm.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_gsm.c?view=diff&rev=147142&r1=147141&r2=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_gsm.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_gsm.c Tue Oct  7 10:33:39 2008
@@ -48,8 +48,8 @@
 #include "../formats/msgsm.h"
 
 /* Sample frame data */
-#include "slin_ex.h"
-#include "gsm_ex.h"
+#include "asterisk/slin.h"
+#include "ex_gsm.h"
 
 #define BUFFER_SAMPLES	8000
 #define GSM_SAMPLES	160
@@ -68,33 +68,18 @@
 	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(slin8_ex);
-	/* Assume 8000 Hz */
-	f.samples = sizeof(slin8_ex)/2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin8_ex;
-	return &f;
-}
-
 static struct ast_frame *gsm_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_GSM;
-	f.datalen = sizeof(gsm_ex);
+	f.datalen = sizeof(ex_gsm);
 	/* All frames are 20 ms long */
 	f.samples = GSM_SAMPLES;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = gsm_ex;
+	f.data.ptr = ex_gsm;
 	return &f;
 }
 
@@ -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_fix/codecs/codec_ilbc.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_ilbc.c?view=diff&rev=147142&r1=147141&r2=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_ilbc.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_ilbc.c Tue Oct  7 10:33:39 2008
@@ -41,8 +41,8 @@
 #include "ilbc/iLBC_decode.h"
 
 /* Sample frame data */
-#include "slin_ex.h"
-#include "ilbc_ex.h"
+#include "asterisk/slin.h"
+#include "ex_ilbc.h"
 
 #define USE_ILBC_ENHANCER	0
 #define ILBC_MS 			30
@@ -77,32 +77,18 @@
 	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(slin8_ex);
-	f.samples = sizeof(slin8_ex)/2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin8_ex;
-	return &f;
-}
-
 static struct ast_frame *ilbc_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ILBC;
-	f.datalen = sizeof(ilbc_ex);
+	f.datalen = sizeof(ex_ilbc);
 	/* All frames are 30 ms long */
 	f.samples = ILBC_SAMPLES;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = ilbc_ex;
+	f.data.ptr = ex_ilbc;
 	return &f;
 }
 
@@ -207,7 +193,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_fix/codecs/codec_lpc10.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_lpc10.c?view=diff&rev=147142&r1=147141&r2=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_lpc10.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_lpc10.c Tue Oct  7 10:33:39 2008
@@ -39,8 +39,8 @@
 #include "lpc10/lpc10.h"
 
 /* Sample frame data */
-#include "slin_ex.h"
-#include "lpc10_ex.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
    samples long, which isn't even an even number of milliseconds...  Not only that
@@ -75,34 +75,19 @@
 	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(slin8_ex);
-	/* Assume 8000 Hz */
-	f.samples = LPC10_SAMPLES_PER_FRAME;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin8_ex;
-	return &f;
-}
-
 static struct ast_frame *lpc10_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_LPC10;
-	f.datalen = sizeof(lpc10_ex);
+	f.datalen = sizeof(ex_lpc10);
 	/* All frames are 22 ms long (maybe a little more -- why did he choose
 	   LPC10_SAMPLES_PER_FRAME sample frames anyway?? */
 	f.samples = LPC10_SAMPLES_PER_FRAME;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = lpc10_ex;
+	f.data.ptr = ex_lpc10;
 	return &f;
 }
 
@@ -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_fix/codecs/codec_resample.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_resample.c?view=diff&rev=147142&r1=147141&r2=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_resample.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_resample.c Tue Oct  7 10:33:39 2008
@@ -49,8 +49,7 @@
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
 
-#include "slin_ex.h"
-#include "slin16_ex.h"
+#include "asterisk/slin.h"
 
 #define RESAMPLER_QUALITY 1
 
@@ -70,9 +69,9 @@
 {
 	struct slin16_to_slin8_pvt *resamp_pvt = pvt->pvt;
 
-	resamp_pvt->resample_factor = 0.5;
-
-	if (!(resamp_pvt->resampler = resample_open(RESAMPLER_QUALITY, 0.5, 0.5)))
+	resamp_pvt->resample_factor = 8000.0 / 16000.0;
+
+	if (!(resamp_pvt->resampler = resample_open(RESAMPLER_QUALITY, resamp_pvt->resample_factor, resamp_pvt->resample_factor)))
 		return -1;
 
 	return 0;
@@ -82,9 +81,9 @@
 {
 	struct slin8_to_slin16_pvt *resamp_pvt = pvt->pvt;
 
-	resamp_pvt->resample_factor = 2.0;
-
-	if (!(resamp_pvt->resampler = resample_open(RESAMPLER_QUALITY, 2.0, 2.0)))
+	resamp_pvt->resample_factor = 16000.0 / 8000.0;
+
+	if (!(resamp_pvt->resampler = resample_open(RESAMPLER_QUALITY, resamp_pvt->resample_factor, resamp_pvt->resample_factor)))
 		return -1;
 
 	return 0;
@@ -167,34 +166,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(slin16_ex),
-		.samples = ARRAY_LEN(slin16_ex),
-		.src = __PRETTY_FUNCTION__,
-		.data.ptr = slin16_ex,
-	};
-
-	return &f;
-}
-
-static struct ast_frame *slin8_sample(void)
-{
-	static struct ast_frame f = {
-		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR,
-		.datalen = sizeof(slin8_ex),
-		.samples = ARRAY_LEN(slin8_ex),
-		.src = __PRETTY_FUNCTION__,
-		.data.ptr = slin8_ex,
-	};
-
-	return &f;
 }
 
 static struct ast_translator slin16_to_slin8 = {

Modified: team/qwell/codec_consistency_fix/codecs/codec_speex.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_speex.c?view=diff&rev=147142&r1=147141&r2=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_speex.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_speex.c Tue Oct  7 10:33:39 2008
@@ -54,8 +54,8 @@
 #include "asterisk/utils.h"
 
 /* Sample frame data */
-#include "slin_ex.h"
-#include "speex_ex.h"
+#include "asterisk/slin.h"
+#include "ex_speex.h"
 
 /* codec variables */
 static int quality = 3;
@@ -154,33 +154,18 @@
 	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(slin8_ex);
-	/* Assume 8000 Hz */
-	f.samples = sizeof(slin8_ex)/2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin8_ex;
-	return &f;
-}
-
 static struct ast_frame *speex_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_SPEEX;
-	f.datalen = sizeof(speex_ex);
+	f.datalen = sizeof(ex_speex);
 	/* All frames are 20 ms long */
 	f.samples = SPEEX_SAMPLES;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = speex_ex;
+	f.data.ptr = ex_speex;
 	return &f;
 }
 
@@ -361,7 +346,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_fix/codecs/codec_ulaw.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_ulaw.c?view=diff&rev=147142&r1=147141&r2=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_ulaw.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_ulaw.c Tue Oct  7 10:33:39 2008
@@ -36,9 +36,8 @@
 #define BUFFER_SAMPLES   8096	/* size for the translation buffers */
 
 /* Sample frame data */
-
-#include "slin_ex.h"
-#include "ulaw_ex.h"
+#include "asterisk/slin.h"
+#include "ex_ulaw.h"
 
 /*! \brief convert and store samples in outbuf */
 static int ulawtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
@@ -79,31 +78,12 @@
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ULAW;
-	f.datalen = sizeof(ulaw_ex);
-	f.samples = sizeof(ulaw_ex);
+	f.datalen = sizeof(ex_ulaw);
+	f.samples = sizeof(ex_ulaw);
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = ulaw_ex;
-	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(slin8_ex);
-	/* Assume 8000 Hz */
-	f.samples = sizeof(slin8_ex) / 2;
-	f.mallocd = 0;
-	f.offset = 0;
-	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin8_ex;
+	f.data.ptr = ex_ulaw;
 	return &f;
 }
 
@@ -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_fix/codecs/ex_adpcm.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/ex_adpcm.h?view=auto&rev=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_adpcm.h (added)
+++ team/qwell/codec_consistency_fix/codecs/ex_adpcm.h Tue Oct  7 10:33:39 2008
@@ -1,0 +1,15 @@
+/*! \file
+ * \brief 4-bit ADPCM data
+ *
+ * Source: 
+ *
+ * Copyright (C) 2008, Digium, Inc.
+ *
+ * Distributed under the terms of the GNU General Public License
+ *
+ */
+
+static unsigned char ex_adpcm[] = {
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};

Propchange: team/qwell/codec_consistency_fix/codecs/ex_adpcm.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency_fix/codecs/ex_adpcm.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency_fix/codecs/ex_adpcm.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/qwell/codec_consistency_fix/codecs/ex_alaw.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/ex_alaw.h?view=auto&rev=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_alaw.h (added)
+++ team/qwell/codec_consistency_fix/codecs/ex_alaw.h Tue Oct  7 10:33:39 2008
@@ -1,0 +1,23 @@
+/*! \file
+ * \brief 4-bit ADPCM data
+ *
+ * Source: 
+ *
+ * Copyright (C) 2008, Digium Inc.
+ *
+ * Distributed under the terms of the GNU General Public License
+ *
+ */
+
+static unsigned char ex_alaw[] = {
+	0x00, 0x03, 0x06, 0x09, 0x0c, 0x0f, 0x12, 0x15,
+	0x10, 0x18, 0x1b, 0x1e, 0x21, 0x24, 0x27, 0x2a,
+	0x20, 0x2d, 0x30, 0x33, 0x36, 0x39, 0x3c, 0x3f,
+	0x30, 0x42, 0x45, 0x48, 0x4b, 0x4e, 0x51, 0x54,
+	0x40, 0x57, 0x5a, 0x5d, 0x60, 0x63, 0x66, 0x69,
+	0x50, 0x6c, 0x6f, 0x72, 0x75, 0x78, 0x7b, 0x7e,
+	0x60, 0x81, 0x84, 0x87, 0x8a, 0x8d, 0x90, 0x93,
+	0x70, 0x96, 0x99, 0x9c, 0x9f, 0xa2, 0xa5, 0xa8,
+	0x80, 0xab, 0xae, 0xb1, 0xb4, 0xb7, 0xba, 0xbd,
+	0x90, 0xc0, 0xc3, 0xc6, 0xc9, 0xcc, 0xcf, 0xd2,
+};

Propchange: team/qwell/codec_consistency_fix/codecs/ex_alaw.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency_fix/codecs/ex_alaw.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency_fix/codecs/ex_alaw.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/qwell/codec_consistency_fix/codecs/ex_g722.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/ex_g722.h?view=auto&rev=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_g722.h (added)
+++ team/qwell/codec_consistency_fix/codecs/ex_g722.h Tue Oct  7 10:33:39 2008
@@ -1,0 +1,15 @@
+/*! \file
+ * \brief 4-bit ADPCM data
+ *
+ * Source: 
+ *
+ * Copyright (C) 2008, Digium Inc.
+ *
+ * Distributed under the terms of the GNU General Public License
+ *
+ */
+
+static unsigned char ex_g722[] = {
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};

Propchange: team/qwell/codec_consistency_fix/codecs/ex_g722.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency_fix/codecs/ex_g722.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency_fix/codecs/ex_g722.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/qwell/codec_consistency_fix/codecs/ex_g726.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/ex_g726.h?view=auto&rev=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_g726.h (added)
+++ team/qwell/codec_consistency_fix/codecs/ex_g726.h Tue Oct  7 10:33:39 2008
@@ -1,0 +1,15 @@
+/*! \file
+ * \brief 4-bit G.726 data
+ *
+ * Source: 
+ *
+ * Copyright (C) 2008, Digium, Inc.
+ *
+ * Distributed under the terms of the GNU General Public License
+ *
+ */
+
+static unsigned char ex_g726[] = {
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};

Propchange: team/qwell/codec_consistency_fix/codecs/ex_g726.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency_fix/codecs/ex_g726.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency_fix/codecs/ex_g726.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/qwell/codec_consistency_fix/codecs/ex_gsm.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/ex_gsm.h?view=auto&rev=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_gsm.h (added)
+++ team/qwell/codec_consistency_fix/codecs/ex_gsm.h Tue Oct  7 10:33:39 2008
@@ -1,0 +1,17 @@
+/*! \file
+  * \brief 8-bit raw data
+  *
+  * Source: 
+  *
+  * Copyright (C) 1999-2005, Digium Inc.
+  *
+  * Distributed under the terms of the GNU General Public License
+  *
+  */
+
+static unsigned char ex_gsm[] = {
+	0xda, 0xa6, 0xac, 0x2d, 0xa3, 0x50, 0x00, 0x49, 0x24, 0x92, 
+	0x49, 0x24, 0x50, 0x40, 0x49, 0x24, 0x92, 0x37, 0x24, 0x52, 
+	0x00, 0x49, 0x24, 0x92, 0x47, 0x24, 0x50, 0x80, 0x46, 0xe3, 
+	0x6d, 0xb8, 0xdc,
+};

Propchange: team/qwell/codec_consistency_fix/codecs/ex_gsm.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency_fix/codecs/ex_gsm.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency_fix/codecs/ex_gsm.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/qwell/codec_consistency_fix/codecs/ex_ilbc.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/ex_ilbc.h?view=auto&rev=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_ilbc.h (added)
+++ team/qwell/codec_consistency_fix/codecs/ex_ilbc.h Tue Oct  7 10:33:39 2008
@@ -1,0 +1,18 @@
+/*! \file
+  * \brief Raw 8-bit data
+  *
+  * Source: 
+  *
+  * Copyright (C) 2008, Digium Inc.
+  *
+  * Distributed under the terms of the GNU General Public License
+  *
+  */
+
+static unsigned char ex_ilbc[] = {
+	0xff, 0xa0, 0xff, 0xfa, 0x0f, 0x60, 0x12, 0x11, 0xa2, 0x47, 
+	0x22, 0x8c, 0x00, 0x00, 0x01, 0x02, 0x80, 0x43, 0xa0, 0x40, 
+	0x33, 0xff, 0xcf, 0xc0, 0xf3, 0xf3, 0x3f, 0x8f, 0x3f, 0xff, 
+	0xff, 0xff, 0xff, 0xfc, 0xf9, 0xe5, 0x55, 0x78, 0x0b, 0xca, 
+	0xe1, 0x27, 0x94, 0x7b, 0xa8, 0x91, 0x2c, 0x36, 0x08, 0x56,
+};

Propchange: team/qwell/codec_consistency_fix/codecs/ex_ilbc.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency_fix/codecs/ex_ilbc.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency_fix/codecs/ex_ilbc.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/qwell/codec_consistency_fix/codecs/ex_lpc10.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/ex_lpc10.h?view=auto&rev=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_lpc10.h (added)
+++ team/qwell/codec_consistency_fix/codecs/ex_lpc10.h Tue Oct  7 10:33:39 2008
@@ -1,0 +1,14 @@
+/*! \file
+  * \brief
+  *
+  * Source: 
+  *
+  * Copyright (C) 2008, Digium Inc.
+  *
+  * Distributed under the terms of the GNU General Public License
+  *
+  */
+
+static unsigned char ex_lpc10[] = {
+	0x01, 0x08, 0x31, 0x08, 0x31, 0x80, 0x30,
+};

Propchange: team/qwell/codec_consistency_fix/codecs/ex_lpc10.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency_fix/codecs/ex_lpc10.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency_fix/codecs/ex_lpc10.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/qwell/codec_consistency_fix/codecs/ex_slin16.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/ex_slin16.h?view=auto&rev=147142
==============================================================================
    (empty)

Propchange: team/qwell/codec_consistency_fix/codecs/ex_slin16.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency_fix/codecs/ex_slin16.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency_fix/codecs/ex_slin16.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/qwell/codec_consistency_fix/codecs/ex_slin8.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/ex_slin8.h?view=auto&rev=147142
==============================================================================
    (empty)

Propchange: team/qwell/codec_consistency_fix/codecs/ex_slin8.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency_fix/codecs/ex_slin8.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency_fix/codecs/ex_slin8.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/qwell/codec_consistency_fix/codecs/ex_speex.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/ex_speex.h?view=auto&rev=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_speex.h (added)
+++ team/qwell/codec_consistency_fix/codecs/ex_speex.h Tue Oct  7 10:33:39 2008
@@ -1,0 +1,17 @@
+/*! \file
+  * \brief Random Data data
+  *
+  * Source: 
+  *
+  * Copyright (C) 2008, Digium Inc.
+  *
+  * Distributed under the terms of the GNU General Public License
+  *
+  */
+
+static unsigned char ex_speex[] = {
+	0x2e, 0x8e, 0x0f, 0x9a, 0x20, 0000, 0x01, 0x7f, 0xff, 0xff, 
+	0xff, 0xff, 0xff, 0x91, 0000, 0xbf, 0xff, 0xff, 0xff, 0xff, 
+	0xff, 0xdc, 0x80, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
+	0x98, 0x7f, 0xff, 0xff, 0xff, 0xe8, 0xff, 0xf7, 0x80,
+};

Propchange: team/qwell/codec_consistency_fix/codecs/ex_speex.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency_fix/codecs/ex_speex.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency_fix/codecs/ex_speex.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/qwell/codec_consistency_fix/codecs/ex_ulaw.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/ex_ulaw.h?view=auto&rev=147142
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_ulaw.h (added)
+++ team/qwell/codec_consistency_fix/codecs/ex_ulaw.h Tue Oct  7 10:33:39 2008
@@ -1,0 +1,23 @@
+/*! \file
+ * \brief 4-bit ADPCM data
+ *
+ * Source: 
+ *
+ * Copyright (C) 2008, Digium Inc.
+ *
+ * Distributed under the terms of the GNU General Public License
+ *
+ */
+
+static unsigned char ex_ulaw[] = {
+	0x00, 0x03, 0x06, 0x09, 0x0c, 0x0f, 0x12, 0x15,
+	0x10, 0x18, 0x1b, 0x1e, 0x21, 0x24, 0x27, 0x2a,
+	0x20, 0x2d, 0x30, 0x33, 0x36, 0x39, 0x3c, 0x3f,
+	0x30, 0x42, 0x45, 0x48, 0x4b, 0x4e, 0x51, 0x54,
+	0x40, 0x57, 0x5a, 0x5d, 0x60, 0x63, 0x66, 0x69,
+	0x50, 0x6c, 0x6f, 0x72, 0x75, 0x78, 0x7b, 0x7e,
+	0x60, 0x81, 0x84, 0x87, 0x8a, 0x8d, 0x90, 0x93,
+	0x70, 0x96, 0x99, 0x9c, 0x9f, 0xa2, 0xa5, 0xa8,
+	0x80, 0xab, 0xae, 0xb1, 0xb4, 0xb7, 0xba, 0xbd,
+	0x90, 0xc0, 0xc3, 0xc6, 0xc9, 0xcc, 0xcf, 0xd2,
+};

Propchange: team/qwell/codec_consistency_fix/codecs/ex_ulaw.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/qwell/codec_consistency_fix/codecs/ex_ulaw.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/qwell/codec_consistency_fix/codecs/ex_ulaw.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/qwell/codec_consistency_fix/include/asterisk/slin.h
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/include/asterisk/slin.h?view=auto&rev=147142
==============================================================================
--- team/qwell/codec_consistency_fix/include/asterisk/slin.h (added)
+++ team/qwell/codec_consistency_fix/include/asterisk/slin.h Tue Oct  7 10:33:39 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.ptr = 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),

[... 20 lines stripped ...]



More information about the asterisk-commits mailing list