mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-14 11:06:36 +00:00
FSCORE-510
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15896 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2ca3c17e90
commit
b71a3176ba
@ -1553,6 +1553,7 @@ static switch_bool_t inband_dtmf_generate_callback(switch_media_bug_t *bug, void
|
|||||||
frame = switch_core_media_bug_get_write_replace_frame(bug);
|
frame = switch_core_media_bug_get_write_replace_frame(bug);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!switch_buffer_inuse(pvt->audio_buffer)) {
|
||||||
while (switch_queue_trypop(pvt->digit_queue, &pop) == SWITCH_STATUS_SUCCESS) {
|
while (switch_queue_trypop(pvt->digit_queue, &pop) == SWITCH_STATUS_SUCCESS) {
|
||||||
switch_dtmf_t *dtmf = (switch_dtmf_t *) pop;
|
switch_dtmf_t *dtmf = (switch_dtmf_t *) pop;
|
||||||
char buf[2] = "";
|
char buf[2] = "";
|
||||||
@ -1568,8 +1569,7 @@ static switch_bool_t inband_dtmf_generate_callback(switch_media_bug_t *bug, void
|
|||||||
teletone_run(&pvt->ts, buf);
|
teletone_run(&pvt->ts, buf);
|
||||||
free(pop);
|
free(pop);
|
||||||
}
|
}
|
||||||
|
} else if (switch_buffer_inuse(pvt->audio_buffer) && (bytes = switch_buffer_read(pvt->audio_buffer, frame->data, frame->datalen))) {
|
||||||
if (switch_buffer_inuse(pvt->audio_buffer) && (bytes = switch_buffer_read(pvt->audio_buffer, frame->data, frame->datalen))) {
|
|
||||||
if (bytes < frame->datalen) {
|
if (bytes < frame->datalen) {
|
||||||
switch_byte_t *dp = frame->data;
|
switch_byte_t *dp = frame->data;
|
||||||
memset(dp + bytes, 0, frame->datalen - bytes);
|
memset(dp + bytes, 0, frame->datalen - bytes);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user