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

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


Author: qwell
Date: Tue Oct  7 13:40:44 2008
New Revision: 147305

URL: http://svn.digium.com/view/asterisk?view=rev&rev=147305
Log:
Make types more consistent, and use proper calculations for number of samples.

Modified:
    team/qwell/codec_consistency_fix/codecs/ex_adpcm.h
    team/qwell/codec_consistency_fix/codecs/ex_alaw.h
    team/qwell/codec_consistency_fix/codecs/ex_g722.h
    team/qwell/codec_consistency_fix/codecs/ex_g726.h
    team/qwell/codec_consistency_fix/codecs/ex_gsm.h
    team/qwell/codec_consistency_fix/codecs/ex_ilbc.h
    team/qwell/codec_consistency_fix/codecs/ex_lpc10.h
    team/qwell/codec_consistency_fix/codecs/ex_speex.h
    team/qwell/codec_consistency_fix/codecs/ex_ulaw.h
    team/qwell/codec_consistency_fix/include/asterisk/slin.h

Modified: 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=diff&rev=147305&r1=147304&r2=147305
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_adpcm.h (original)
+++ team/qwell/codec_consistency_fix/codecs/ex_adpcm.h Tue Oct  7 13:40:44 2008
@@ -7,7 +7,10 @@
  *
  */
 
-static unsigned char ex_adpcm[] = {
+static uint8_t ex_adpcm[] = {
+	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,
 };
@@ -18,7 +21,7 @@
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_ADPCM,
 		.datalen = sizeof(ex_adpcm),
-		.samples = sizeof(ex_adpcm) * 2,
+		.samples = ARRAY_LEN(ex_adpcm) * 2,
 		.mallocd = 0,
 		.offset = 0,
 		.src = __PRETTY_FUNCTION__,

Modified: 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=diff&rev=147305&r1=147304&r2=147305
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_alaw.h (original)
+++ team/qwell/codec_consistency_fix/codecs/ex_alaw.h Tue Oct  7 13:40:44 2008
@@ -7,7 +7,7 @@
  *
  */
 
-static unsigned char ex_alaw[] = {
+static uint8_t 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,
@@ -26,7 +26,7 @@
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_ALAW,
 		.datalen = sizeof(ex_alaw),
-		.samples = sizeof(ex_alaw),
+		.samples = ARRAY_LEN(ex_alaw),
 		.mallocd = 0,
 		.offset = 0,
 		.src = __PRETTY_FUNCTION__,

Modified: 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=diff&rev=147305&r1=147304&r2=147305
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_g722.h (original)
+++ team/qwell/codec_consistency_fix/codecs/ex_g722.h Tue Oct  7 13:40:44 2008
@@ -1,5 +1,5 @@
 /*! \file
- * \brief 16-bit data
+ * \brief 8-bit data
  *
  * Copyright (C) 2008, Digium, Inc.
  *
@@ -7,7 +7,25 @@
  *
  */
 
-static unsigned char ex_g722[] = {
+static uint8_t ex_g722[] = {
+	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,
+	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,
+	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,
+	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,
 };
@@ -18,7 +36,7 @@
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_G722,
 		.datalen = sizeof(ex_g722),
-		.samples = sizeof(ex_g722) * 2,
+		.samples = ARRAY_LEN(ex_g722),
 		.mallocd = 0,
 		.offset = 0,
 		.src = __PRETTY_FUNCTION__,

Modified: 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=diff&rev=147305&r1=147304&r2=147305
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_g726.h (original)
+++ team/qwell/codec_consistency_fix/codecs/ex_g726.h Tue Oct  7 13:40:44 2008
@@ -7,7 +7,10 @@
  *
  */
 
-static unsigned char ex_g726[] = {
+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,
 };
@@ -18,7 +21,7 @@
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_G726,
 		.datalen = sizeof(ex_g726),
-		.samples = sizeof(ex_g726) * 2,	/* 2 samples per byte */
+		.samples = ARRAY_LEN(ex_g726) * 2, /* 2 samples per byte */
 		.mallocd = 0,
 		.offset = 0,
 		.src = __PRETTY_FUNCTION__,

Modified: 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=diff&rev=147305&r1=147304&r2=147305
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_gsm.h (original)
+++ team/qwell/codec_consistency_fix/codecs/ex_gsm.h Tue Oct  7 13:40:44 2008
@@ -7,10 +7,10 @@
  *
  */
 
-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, 
+static uint8_t 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,
 };
 

Modified: 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=diff&rev=147305&r1=147304&r2=147305
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_ilbc.h (original)
+++ team/qwell/codec_consistency_fix/codecs/ex_ilbc.h Tue Oct  7 13:40:44 2008
@@ -7,7 +7,7 @@
  *
  */
 
-static unsigned char ex_ilbc[] = {
+static uint8_t 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, 

Modified: 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=diff&rev=147305&r1=147304&r2=147305
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_lpc10.h (original)
+++ team/qwell/codec_consistency_fix/codecs/ex_lpc10.h Tue Oct  7 13:40:44 2008
@@ -7,7 +7,7 @@
  *
  */
 
-static unsigned char ex_lpc10[] = {
+static uint8_t ex_lpc10[] = {
 	0x01, 0x08, 0x31, 0x08, 0x31, 0x80, 0x30,
 };
 

Modified: 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=diff&rev=147305&r1=147304&r2=147305
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_speex.h (original)
+++ team/qwell/codec_consistency_fix/codecs/ex_speex.h Tue Oct  7 13:40:44 2008
@@ -7,7 +7,7 @@
  *
  */
 
-static unsigned char ex_speex[] = {
+static uint8_t 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, 

Modified: 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=diff&rev=147305&r1=147304&r2=147305
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/ex_ulaw.h (original)
+++ team/qwell/codec_consistency_fix/codecs/ex_ulaw.h Tue Oct  7 13:40:44 2008
@@ -7,7 +7,7 @@
  *
  */
 
-static unsigned char ex_ulaw[] = {
+static uint8_t 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,
@@ -26,7 +26,7 @@
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_ULAW,
 		.datalen = sizeof(ex_ulaw),
-		.samples = sizeof(ex_ulaw),
+		.samples = ARRAY_LEN(ex_ulaw),
 		.mallocd = 0,
 		.offset = 0,
 		.src = __PRETTY_FUNCTION__,

Modified: 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=diff&rev=147305&r1=147304&r2=147305
==============================================================================
--- team/qwell/codec_consistency_fix/include/asterisk/slin.h (original)
+++ team/qwell/codec_consistency_fix/include/asterisk/slin.h Tue Oct  7 13:40:44 2008
@@ -16,40 +16,70 @@
  * 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 uint8_t ex_slin8[] = {
+	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,
+	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,
+	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,
+	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 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 uint8_t ex_slin16[] = {
+	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,
+	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,
+	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,
+	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,
+	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,
+	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,
+	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,
+	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 inline struct ast_frame *slin8_sample(void)
@@ -58,7 +88,7 @@
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_SLINEAR,
 		.datalen = sizeof(ex_slin8),
-		.samples = ARRAY_LEN(ex_slin8),
+		.samples = ARRAY_LEN(ex_slin8) / 2,
 		.mallocd = 0,
 		.offset = 0,
 		.src = __PRETTY_FUNCTION__,
@@ -74,7 +104,7 @@
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_SLINEAR16,
 		.datalen = sizeof(ex_slin16),
-		.samples = ARRAY_LEN(ex_slin16),
+		.samples = ARRAY_LEN(ex_slin16) / 2,
 		.mallocd = 0,
 		.offset = 0,
 		.src = __PRETTY_FUNCTION__,




More information about the asterisk-commits mailing list