mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-12 12:37:05 +00:00
add read_frame_callback to input args in the core
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5777 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
c22d70e76f
commit
ff61ecfc73
3 files changed
+36
-3
No files matched your search
@@ -449,6 +449,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
|
||||
break;
|
||||
}
|
||||
|
||||
if (args && (args->read_frame_callback)) {
|
||||
if (args->read_frame_callback(session, read_frame, args->user_data) != SWITCH_STATUS_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (fh->thresh) {
|
||||
int16_t *fdata = (int16_t *) read_frame->data;
|
||||
uint32_t samples = read_frame->datalen / sizeof(*fdata);
|
||||
@@ -564,6 +570,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_gentones(switch_core_session_t *sessi
|
||||
continue;
|
||||
}
|
||||
|
||||
if (args && (args->read_frame_callback)) {
|
||||
if (args->read_frame_callback(session, read_frame, args->user_data) != SWITCH_STATUS_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((write_frame.datalen = (uint32_t) switch_buffer_read_loop(audio_buffer, write_frame.data,
|
||||
read_frame->codec->implementation->bytes_per_frame)) <= 0) {
|
||||
break;
|
||||
@@ -997,6 +1009,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
|
||||
if (!SWITCH_READ_ACCEPTABLE(status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (args && (args->read_frame_callback)) {
|
||||
if (args->read_frame_callback(session, read_frame, args->user_data) != SWITCH_STATUS_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1266,6 +1284,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
|
||||
if (!SWITCH_READ_ACCEPTABLE(status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (args && (args->read_frame_callback)) {
|
||||
if (args->read_frame_callback(session, read_frame, args->user_data) != SWITCH_STATUS_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -1323,6 +1347,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
|
||||
if (!SWITCH_READ_ACCEPTABLE(status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (args && (args->read_frame_callback)) {
|
||||
if (args->read_frame_callback(session, read_frame, args->user_data) != SWITCH_STATUS_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user