]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5701 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 14 Aug 2013 16:00:08 +0000 (21:00 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 14 Aug 2013 16:00:18 +0000 (21:00 +0500)
src/switch_ivr.c

index 232f0a6dd20ef9bc8b44660706a412e1f40c0a8c..1f91ed96254ccbb0e585d914be1a856968c5f872 100644 (file)
@@ -2907,6 +2907,12 @@ SWITCH_DECLARE(void) switch_ivr_delay_echo(switch_core_session_t *session, uint3
        interval = read_impl.microseconds_per_packet / 1000;
        //samples = switch_samples_per_packet(read_impl.samples_per_second, interval);
 
+       if (delay_ms < interval * 2) {
+               delay_ms = interval * 2;
+               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Minimum possible delay for this codec (%d) has been chosen\n", delay_ms);
+       }
+
+
        qlen = delay_ms / (interval) / 2;
        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Setting delay to %dms (%d frames)\n", delay_ms, qlen);
        jb = stfu_n_init(qlen, qlen, read_impl.samples_per_packet, read_impl.samples_per_second, 0);