changes aren't too extreme, but upgrading users should review upgrade notes in /usr/local/share/doc/asterisk (UPGRADE-14.txt, UPGRADE-15.txt, UPGRADE.txt).
50 lines
2.4 KiB
Plaintext
50 lines
2.4 KiB
Plaintext
$OpenBSD: patch-main_audiohook_c,v 1.4 2019/01/29 23:40:02 sthen Exp $
|
|
|
|
Raise level of audiohook debug messages, they are very frequent on OpenBSD
|
|
making any debug levels unusable.
|
|
|
|
Index: main/audiohook.c
|
|
--- main/audiohook.c.orig
|
|
+++ main/audiohook.c
|
|
@@ -272,19 +272,19 @@ static struct ast_frame *audiohook_read_frame_both(str
|
|
|
|
if (!usable_read && !usable_write) {
|
|
/* If both factories are unusable bail out */
|
|
- ast_debug(1, "Read factory %p and write factory %p both fail to provide %zu samples\n", &audiohook->read_factory, &audiohook->write_factory, samples);
|
|
+ ast_debug(6, "Read factory %p and write factory %p both fail to provide %zu samples\n", &audiohook->read_factory, &audiohook->write_factory, samples);
|
|
return NULL;
|
|
}
|
|
|
|
/* If we want to provide only a read factory make sure we aren't waiting for other audio */
|
|
if (usable_read && !usable_write && (ast_tvdiff_ms(ast_tvnow(), audiohook->write_time) < (samples/8)*2)) {
|
|
- ast_debug(3, "Write factory %p was pretty quick last time, waiting for them.\n", &audiohook->write_factory);
|
|
+ ast_debug(6, "Write factory %p was pretty quick last time, waiting for them.\n", &audiohook->write_factory);
|
|
return NULL;
|
|
}
|
|
|
|
/* If we want to provide only a write factory make sure we aren't waiting for other audio */
|
|
if (usable_write && !usable_read && (ast_tvdiff_ms(ast_tvnow(), audiohook->read_time) < (samples/8)*2)) {
|
|
- ast_debug(3, "Read factory %p was pretty quick last time, waiting for them.\n", &audiohook->read_factory);
|
|
+ ast_debug(6, "Read factory %p was pretty quick last time, waiting for them.\n", &audiohook->read_factory);
|
|
return NULL;
|
|
}
|
|
|
|
@@ -309,7 +309,7 @@ static struct ast_frame *audiohook_read_frame_both(str
|
|
}
|
|
}
|
|
} else {
|
|
- ast_debug(1, "Failed to get %d samples from read factory %p\n", (int)samples, &audiohook->read_factory);
|
|
+ ast_debug(6, "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 */
|
|
@@ -333,7 +333,7 @@ static struct ast_frame *audiohook_read_frame_both(str
|
|
}
|
|
}
|
|
} else {
|
|
- ast_debug(1, "Failed to get %d samples from write factory %p\n", (int)samples, &audiohook->write_factory);
|
|
+ ast_debug(6, "Failed to get %d samples from write factory %p\n", (int)samples, &audiohook->write_factory);
|
|
}
|
|
|
|
frame.subclass.format = ast_format_cache_get_slin_by_rate(audiohook->hook_internal_samp_rate);
|