[asterisk-commits] dvossel: branch dvossel/fixtheworld_phase2 r306433 - in /team/dvossel/fixthew...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 4 17:01:11 CST 2011


Author: dvossel
Date: Fri Feb  4 17:01:07 2011
New Revision: 306433

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=306433
Log:
SILK get sample rate function

Modified:
    team/dvossel/fixtheworld_phase2/include/asterisk/frame.h
    team/dvossel/fixtheworld_phase2/main/channel.c

Modified: team/dvossel/fixtheworld_phase2/include/asterisk/frame.h
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase2/include/asterisk/frame.h?view=diff&rev=306433&r1=306432&r2=306433
==============================================================================
--- team/dvossel/fixtheworld_phase2/include/asterisk/frame.h (original)
+++ team/dvossel/fixtheworld_phase2/include/asterisk/frame.h Fri Feb  4 17:01:07 2011
@@ -585,6 +585,25 @@
 		return 32000;
 	case AST_FORMAT_G719:
 		return 48000;
+	case AST_FORMAT_SILK:
+		if (!(ast_format_isset(format,
+			SILK_ATTR_KEY_SAMP_RATE,
+			SILK_ATTR_VAL_SAMP_24KHZ,
+			AST_FORMAT_ATTR_END))) {
+			return 24000;
+		} else if (!(ast_format_isset(format,
+			SILK_ATTR_KEY_SAMP_RATE,
+			SILK_ATTR_VAL_SAMP_16KHZ,
+			AST_FORMAT_ATTR_END))) {
+			return 16000;
+		} else if (!(ast_format_isset(format,
+			SILK_ATTR_KEY_SAMP_RATE,
+			SILK_ATTR_VAL_SAMP_12KHZ,
+			AST_FORMAT_ATTR_END))) {
+			return 12000;
+		} else {
+			return 8000;
+		}
 	default:
 		return 8000;
 	}

Modified: team/dvossel/fixtheworld_phase2/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase2/main/channel.c?view=diff&rev=306433&r1=306432&r2=306433
==============================================================================
--- team/dvossel/fixtheworld_phase2/main/channel.c (original)
+++ team/dvossel/fixtheworld_phase2/main/channel.c Fri Feb  4 17:01:07 2011
@@ -1022,6 +1022,8 @@
 		/*! Speex is free, but computationally more expensive than GSM */
 		AST_FORMAT_SPEEX16,
 		AST_FORMAT_SPEEX,
+		/*! SILK is just had to go somewhere */
+		AST_FORMAT_SILK,
 		/*! Ick, LPC10 sounds terrible, but at least we have code for it, if you're tacky enough
 		    to use it */
 		AST_FORMAT_LPC10,




More information about the asterisk-commits mailing list