summaryrefslogtreecommitdiff
path: root/main/audiohook.c
diff options
context:
space:
mode:
authorPaul Belanger <paul.belanger@polybeacon.com>2011-02-04 16:55:39 +0000
committerPaul Belanger <paul.belanger@polybeacon.com>2011-02-04 16:55:39 +0000
commit3556e4c2d46e8f8d8480c08f9aae049a53f3a493 (patch)
treea3d1da6c10bc2730a0a579368a28f804a074c035 /main/audiohook.c
parent9f65acf33e3cab60a9a4e635fe00e6abf2ddc561 (diff)
Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(closes issue #18556) Reported by: kkm Review: https://reviewboard.asterisk.org/r/1071/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/audiohook.c')
-rw-r--r--main/audiohook.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/main/audiohook.c b/main/audiohook.c
index 23650a79f..6b2df6416 100644
--- a/main/audiohook.c
+++ b/main/audiohook.c
@@ -138,16 +138,13 @@ int ast_audiohook_write_frame(struct ast_audiohook *audiohook, enum ast_audiohoo
other_factory_ms = other_factory_samples / 8;
if (ast_test_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC) && other_factory_samples && (our_factory_ms - other_factory_ms > AST_AUDIOHOOK_SYNC_TOLERANCE)) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Flushing audiohook %p so it remains in sync\n", audiohook);
+ ast_debug(1, "Flushing audiohook %p so it remains in sync\n", audiohook);
ast_slinfactory_flush(factory);
ast_slinfactory_flush(other_factory);
}
if (ast_test_flag(audiohook, AST_AUDIOHOOK_SMALL_QUEUE) && (our_factory_samples > 640 || other_factory_samples > 640)) {
- if (option_debug) {
- ast_log(LOG_DEBUG, "Audiohook %p has stale audio in its factories. Flushing them both\n", audiohook);
- }
+ ast_debug(1, "Audiohook %p has stale audio in its factories. Flushing them both\n", audiohook);
ast_slinfactory_flush(factory);
ast_slinfactory_flush(other_factory);
}
@@ -256,8 +253,8 @@ static struct ast_frame *audiohook_read_frame_both(struct ast_audiohook *audioho
}
}
}
- } else if (option_debug)
- ast_log(LOG_DEBUG, "Failed to get %d samples from read factory %p\n", (int)samples, &audiohook->read_factory);
+ }
+ ast_debug(1, "Failed to get %d samples from read factory %p\n", (int)samples, &audiohook->read_factory);
/* Move on to the write factory... if there are enough samples, read them in */
if (usable_write) {
@@ -275,8 +272,8 @@ static struct ast_frame *audiohook_read_frame_both(struct ast_audiohook *audioho
}
}
}
- } else if (option_debug)
- ast_log(LOG_DEBUG, "Failed to get %d samples from write factory %p\n", (int)samples, &audiohook->write_factory);
+ }
+ ast_debug(1, "Failed to get %d samples from write factory %p\n", (int)samples, &audiohook->write_factory);
/* Basically we figure out which buffer to use... and if mixing can be done here */
if (!read_buf && !write_buf)
@@ -818,7 +815,7 @@ int ast_channel_audiohook_count_by_source(struct ast_channel *chan, const char *
AST_LIST_TRAVERSE_SAFE_END;
break;
default:
- ast_log(LOG_DEBUG, "Invalid audiohook type supplied, (%d)\n", type);
+ ast_debug(1, "Invalid audiohook type supplied, (%d)\n", type);
return -1;
}
@@ -856,7 +853,7 @@ int ast_channel_audiohook_count_by_source_running(struct ast_channel *chan, cons
AST_LIST_TRAVERSE_SAFE_END;
break;
default:
- ast_log(LOG_DEBUG, "Invalid audiohook type supplied, (%d)\n", type);
+ ast_debug(1, "Invalid audiohook type supplied, (%d)\n", type);
return -1;
}
return count;