]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7891: [mod_spandsp] Allow spandsp dtmf detector to work on rates other than 8k
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 24 Jul 2015 16:43:31 +0000 (11:43 -0500)
committerMichael Jerris <mike@jerris.com>
Tue, 25 Aug 2015 19:47:40 +0000 (14:47 -0500)
src/mod/applications/mod_spandsp/mod_spandsp_dsp.c

index 6c628075075f080d3489977bdeefbf089dc38068..77ce89436ecee6ed7b868f1d178f8e9820be84f6 100644 (file)
@@ -444,7 +444,7 @@ static switch_bool_t inband_dtmf_callback(switch_media_bug_t *bug, void *user_da
                                        if (switch_resample_create(&pvt->resampler,
                                                                                           read_impl.actual_samples_per_second,
                                                                                           8000,
-                                                                                          8 * (read_impl.microseconds_per_packet / 1000),
+                                                                                          8 * (read_impl.microseconds_per_packet / 1000) * 2,
                                                                                           SWITCH_RESAMPLE_QUALITY, 
                                                                                           1) != SWITCH_STATUS_SUCCESS) {
                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to allocate resampler\n");