[Freeswitch-svn] [commit] r11659 - freeswitch/trunk/src/mod/formats/mod_sndfile

FreeSWITCH SVN brian at freeswitch.org
Thu Feb 5 12:10:08 PST 2009


Author: brian
Date: Thu Feb  5 14:10:08 2009
New Revision: 11659

Log:
MODFORM-22

Modified:
   freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c

Modified: freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c	(original)
+++ freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c	Thu Feb  5 14:10:08 2009
@@ -139,6 +139,9 @@
 		context->sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_ALAW;
 		context->sfinfo.channels = 1;
 		context->sfinfo.samplerate = 8000;
+	} else if (!strcmp(ext, "adpcm")) {
+		context->sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_IMA_ADPCM;
+		context->sfinfo.samplerate = 8000;
 	}
 
 	if ((mode & SFM_WRITE) && sf_format_check(&context->sfinfo) == 0) {
@@ -305,7 +308,7 @@
 	char buffer[128];
 	int format, major_count, subtype_count, m, s;
 	int len, x, skip;
-	char *extras[] = { "r8", "r16", "r24", "r32", "gsm", "ul", "al", NULL };
+	char *extras[] = { "r8", "r16", "r24", "r32", "gsm", "ul", "al", "adpcm", NULL };
 	int exlen = (sizeof(extras) / sizeof(extras[0]));
 	buffer[0] = 0;
 



More information about the Freeswitch-svn mailing list