[Freeswitch-svn] [commit] r13105 - freeswitch/trunk/src
FreeSWITCH SVN
anthm at freeswitch.org
Tue Apr 21 12:32:55 PDT 2009
Author: anthm
Date: Tue Apr 21 14:32:55 2009
New Revision: 13105
Log:
add record_ms, record_samples, playback_ms and playback_samples chanvars
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 Tue Apr 21 14:32:55 2009
@@ -634,6 +634,9 @@
}
}
+ switch_channel_set_variable_printf(channel, "record_ms", "%d", fh->samples_in / read_impl.samples_per_second);
+ switch_channel_set_variable_printf(channel, "record_samples", "%d", fh->samples_in);
+
switch_core_file_close(fh);
switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
return status;
@@ -1280,6 +1283,10 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "done playing file\n");
//switch_core_file_seek(fh, &fh->last_pos, 0, SEEK_CUR);
+
+ switch_channel_set_variable_printf(channel, "playback_ms", "%d", fh->samples_out / read_impl.samples_per_second);
+ switch_channel_set_variable_printf(channel, "playback_samples", "%d", fh->samples_out);
+
switch_core_file_close(fh);
switch_buffer_destroy(&fh->audio_buffer);
switch_buffer_destroy(&fh->sp_audio_buffer);
More information about the Freeswitch-svn
mailing list