提交 6a85ad31 authored 作者: Anthony Minessale's avatar Anthony Minessale

fix regression in spandsp_tone_detect caused by some recent core changes (part 2)

上级 70c6e65e
...@@ -784,7 +784,7 @@ static switch_bool_t callprogress_detector_process_buffer(switch_media_bug_t *bu ...@@ -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)); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "(%s) error reading frame\n", switch_channel_get_name(channel));
return SWITCH_FALSE; 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) { if (detected_tone) {
switch_event_t *event = NULL; 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); 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 ...@@ -796,20 +796,14 @@ static switch_bool_t callprogress_detector_process_buffer(switch_media_bug_t *bu
} }
break; 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: case SWITCH_ABC_TYPE_CLOSE:
if (detector->spandsp_detector) { if (detector->spandsp_detector) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "(%s) destroying tone detector\n", switch_channel_get_name(channel)); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "(%s) destroying tone detector\n", switch_channel_get_name(channel));
tone_detector_destroy(detector); tone_detector_destroy(detector);
} }
break; break;
default:
break;
} }
return SWITCH_TRUE; return SWITCH_TRUE;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论