[svn-commits] russell: branch russell/jack r95441 - /team/russell/jack/channels/chan_console.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Dec 31 12:31:53 CST 2007


Author: russell
Date: Mon Dec 31 12:31:53 2007
New Revision: 95441

URL: http://svn.digium.com/view/asterisk?view=rev&rev=95441
Log:
Make chan_console operate in 16 kHz mode.  This makes chan_console support
wideband codecs, and it also verifies the functionality of codec_resample,
which converts between 8 kHz and 16 kHz audio.

Modified:
    team/russell/jack/channels/chan_console.c

Modified: team/russell/jack/channels/chan_console.c
URL: http://svn.digium.com/view/asterisk/team/russell/jack/channels/chan_console.c?view=diff&rev=95441&r1=95440&r2=95441
==============================================================================
--- team/russell/jack/channels/chan_console.c (original)
+++ team/russell/jack/channels/chan_console.c Mon Dec 31 12:31:53 2007
@@ -73,7 +73,7 @@
  *
  * \note If this changes, NUM_SAMPLES will need to change, as well.
  */
-#define SAMPLE_RATE      8000
+#define SAMPLE_RATE      16000
 
 /*! 
  * \brief The number of samples to configure the portaudio stream for
@@ -88,7 +88,7 @@
  * \note This will need to be dynamic once the sample rate can be something
  *       other than 8 kHz.
  */
-#define NUM_SAMPLES      160
+#define NUM_SAMPLES      320
 
 /*! \brief Mono Input */
 #define INPUT_CHANNELS   1
@@ -201,7 +201,7 @@
  *
  * \note Once 16 kHz is supported, AST_FORMAT_SLINEAR16 needs to be added.
  */
-#define SUPPORTED_FORMATS ( AST_FORMAT_SLINEAR )
+#define SUPPORTED_FORMATS ( AST_FORMAT_SLINEAR16 )
 
 static const struct ast_channel_tech console_tech = {
 	.type = "Console",
@@ -243,7 +243,7 @@
 	PaError res;
 	struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR,
+		.subclass = AST_FORMAT_SLINEAR16,
 		.src = "console_stream_monitor",
 		.data = buf,
 		.datalen = sizeof(buf),
@@ -335,9 +335,9 @@
 	}
 
 	chan->tech = &console_tech;
-	chan->nativeformats = AST_FORMAT_SLINEAR;
-	chan->readformat = AST_FORMAT_SLINEAR;
-	chan->writeformat = AST_FORMAT_SLINEAR;
+	chan->nativeformats = AST_FORMAT_SLINEAR16;
+	chan->readformat = AST_FORMAT_SLINEAR16;
+	chan->writeformat = AST_FORMAT_SLINEAR16;
 	chan->tech_pvt = pvt;
 
 	pvt->owner = chan;




More information about the svn-commits mailing list