tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9151 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
57aadfdd89
commit
fe820b9bdf
|
@ -1012,15 +1012,33 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
|
|||
do_speed = 0;
|
||||
} else if (fh->sp_audio_buffer && (eof || (switch_buffer_inuse(fh->sp_audio_buffer) > (switch_size_t) (framelen)))) {
|
||||
if (!(bread = switch_buffer_read(fh->sp_audio_buffer, abuf, framelen))) {
|
||||
break;
|
||||
if (eof) {
|
||||
continue;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
olen = asis ? bread : bread / 2;
|
||||
|
||||
if (bread < framelen) {
|
||||
memset(abuf + bread, 0, framelen - bread);
|
||||
}
|
||||
|
||||
olen = asis ? framelen : ilen;
|
||||
do_speed = 0;
|
||||
} else if (fh->audio_buffer && (eof || (switch_buffer_inuse(fh->audio_buffer) > (switch_size_t) (framelen)))) {
|
||||
if (!(bread = switch_buffer_read(fh->audio_buffer, abuf, framelen))) {
|
||||
break;
|
||||
if (eof) {
|
||||
break;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
olen = asis ? bread : bread / 2;
|
||||
|
||||
if (bread < framelen) {
|
||||
memset(abuf + bread, 0, framelen - bread);
|
||||
}
|
||||
|
||||
olen = asis ? framelen : ilen;
|
||||
} else {
|
||||
if (eof) {
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue