mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 02:48:29 +00:00
Remove redundant logic
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -223,7 +223,7 @@ static struct ast_frame *audiohook_read_frame_both(struct ast_audiohook *audioho
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Start with the read factory... if there are enough samples, read them in */
|
/* Start with the read factory... if there are enough samples, read them in */
|
||||||
if (usable_read && ast_slinfactory_available(&audiohook->read_factory) >= samples) {
|
if (usable_read) {
|
||||||
if (ast_slinfactory_read(&audiohook->read_factory, buf1, samples)) {
|
if (ast_slinfactory_read(&audiohook->read_factory, buf1, samples)) {
|
||||||
read_buf = buf1;
|
read_buf = buf1;
|
||||||
/* Adjust read volume if need be */
|
/* Adjust read volume if need be */
|
||||||
@@ -242,7 +242,7 @@ static struct ast_frame *audiohook_read_frame_both(struct ast_audiohook *audioho
|
|||||||
ast_log(LOG_DEBUG, "Failed to get %zd samples from read factory %p\n", samples, &audiohook->read_factory);
|
ast_log(LOG_DEBUG, "Failed to get %zd samples from read factory %p\n", samples, &audiohook->read_factory);
|
||||||
|
|
||||||
/* Move on to the write factory... if there are enough samples, read them in */
|
/* Move on to the write factory... if there are enough samples, read them in */
|
||||||
if (usable_write && ast_slinfactory_available(&audiohook->write_factory) >= samples) {
|
if (usable_write) {
|
||||||
if (ast_slinfactory_read(&audiohook->write_factory, buf2, samples)) {
|
if (ast_slinfactory_read(&audiohook->write_factory, buf2, samples)) {
|
||||||
write_buf = buf2;
|
write_buf = buf2;
|
||||||
/* Adjust write volume if need be */
|
/* Adjust write volume if need be */
|
||||||
|
|||||||
Reference in New Issue
Block a user