From 6a85ad31d2c7b5a5abef48a9f7e4af23e565bfd0 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 17 Jul 2012 17:32:46 -0500 Subject: [PATCH] fix regression in spandsp_tone_detect caused by some recent core changes (part 2) --- src/mod/applications/mod_spandsp/mod_spandsp_dsp.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c b/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c index c74069aac1..576c7592d1 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c +++ b/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c @@ -784,7 +784,7 @@ static switch_bool_t callprogress_detector_process_buffer(switch_media_bug_t *bu switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "(%s) error reading frame\n", switch_channel_get_name(channel)); return SWITCH_FALSE; } - tone_detector_process_buffer(detector, frame.data, frame.samples, &detected_tone); + tone_detector_process_buffer(detector, frame->data, frame->samples, &detected_tone); if (detected_tone) { switch_event_t *event = NULL; switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "(%s) DETECTED TONE: %s\n", switch_channel_get_name(channel), detected_tone); @@ -796,20 +796,14 @@ static switch_bool_t callprogress_detector_process_buffer(switch_media_bug_t *bu } break; } - case SWITCH_ABC_TYPE_WRITE: - break; - case SWITCH_ABC_TYPE_WRITE_REPLACE: - break; - case SWITCH_ABC_TYPE_READ_REPLACE: - break; - case SWITCH_ABC_TYPE_READ_PING: - break; case SWITCH_ABC_TYPE_CLOSE: if (detector->spandsp_detector) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "(%s) destroying tone detector\n", switch_channel_get_name(channel)); tone_detector_destroy(detector); } break; + default: + break; } return SWITCH_TRUE; }