[Freeswitch-trunk] [commit] r13768 - freeswitch/trunk/src

FreeSWITCH SVN anthm at freeswitch.org
Fri Jun 12 09:02:23 PDT 2009


Author: anthm
Date: Fri Jun 12 11:02:23 2009
New Revision: 13768

Log:
record_sample_rate variable influences the rate record app will use

Modified:
   freeswitch/trunk/src/switch_ivr_async.c

Modified: freeswitch/trunk/src/switch_ivr_async.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_async.c	(original)
+++ freeswitch/trunk/src/switch_ivr_async.c	Fri Jun 12 11:02:23 2009
@@ -973,6 +973,17 @@
 	rh->file = switch_core_session_strdup(session, file);
 	rh->lead_in = LEAD_IN;
 
+
+	if ((vval = switch_channel_get_variable(channel, "record_sample_rate"))) {
+		int tmp = 0;
+
+		tmp = atoi(vval);
+
+		if (tmp == 8000 || tmp == 16000 || tmp == 32000 || tmp == 11025 || tmp == 22050 || tmp == 44100) {
+			rh->fh->samplerate = tmp;
+		}
+	}
+
 	if ((status = switch_core_media_bug_add(session, record_callback, rh, to, flags, &bug)) != SWITCH_STATUS_SUCCESS) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error adding media bug for file %s\n", file);
 		switch_core_file_close(fh);



More information about the Freeswitch-trunk mailing list