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

FreeSWITCH SVN anthm at freeswitch.org
Fri Jun 12 08:59:20 PDT 2009


Author: anthm
Date: Fri Jun 12 10:59:19 2009
New Revision: 13767

Log:
record_sample_rate variable influences the rate record app will use

Modified:
   freeswitch/trunk/src/switch_ivr_play_say.c

Modified: freeswitch/trunk/src/switch_ivr_play_say.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_play_say.c	(original)
+++ freeswitch/trunk/src/switch_ivr_play_say.c	Fri Jun 12 10:59:19 2009
@@ -416,6 +416,17 @@
 	fh->channels = read_impl.number_of_channels;
 	fh->native_rate = read_impl.actual_samples_per_second;
 
+	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) {
+			fh->samplerate = tmp;
+		}
+	}
+
+
 	if ((vval = switch_channel_get_variable(channel, "record_waste_resources"))) {
 	
 		if (switch_true(vval)) {



More information about the Freeswitch-trunk mailing list