more ivr stuff (not done)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@694 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
bdd2223542
commit
d2ca6983ac
|
@ -182,12 +182,9 @@ static switch_status js_dtmf_callback(switch_core_session *session, char *dtmf,
|
|||
|
||||
if (*ret == 'P') {
|
||||
if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
|
||||
printf("unpause\n");
|
||||
switch_clear_flag(fh, SWITCH_FILE_PAUSE);
|
||||
} else {
|
||||
printf("pause\n");
|
||||
switch_set_flag(fh, SWITCH_FILE_PAUSE);
|
||||
fh->speed = 0;
|
||||
}
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -337,6 +337,8 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
|
|||
|
||||
if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
|
||||
memset(abuf, 0, ilen * 2);
|
||||
olen = ilen;
|
||||
do_speed = 0;
|
||||
} else if (fh->audio_buffer && (switch_buffer_inuse(fh->audio_buffer) > (ilen * 2))) {
|
||||
switch_buffer_read(fh->audio_buffer, abuf, ilen * 2);
|
||||
olen = ilen;
|
||||
|
|
Loading…
Reference in New Issue