summaryrefslogtreecommitdiff
path: root/include/asterisk/audiohook.h
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2015-05-14 15:21:30 -0500
committerKevin Harwell <kharwell@digium.com>2015-05-20 16:08:39 -0500
commit7bf88eb60db0be8543ba3a565c26780dc78dccb8 (patch)
tree59ab8ba0b570c3a49b49663ab9571cdebfbaba7d /include/asterisk/audiohook.h
parent908c6a51d69c84f790633e64d72a2f09037bd6cd (diff)
audiohook.c: Difference in read/write rates caused continuous buffer resets
Currently, everytime a sample rate change occurs (on read or write) the associated factory buffers are reset. If the requested sample rate on a read differed from that of a write then the buffers are continually reset on every read and write. This has the side effect of emptying the buffer, thus there being no data to read and then write to a file in the case of call recording. This patch fixes it so that an audiohook_list's rate always maintains the maximum sample rate among hooks and formats. Audiohook sample rates are only overwritten by this value when slin native compatibility is turned on. Also, the audiohook sample rate can only overwrite the list's sample rate when its rate is greater than that of the list or if compatibility is turned off. This keeps the rate from constantly switching/resetting. ASTERISK-24944 #close Reported by: Ronald Raikes Change-Id: Idab4dfef068a7922c09cc631dda27bc920a6c76f
Diffstat (limited to 'include/asterisk/audiohook.h')
-rw-r--r--include/asterisk/audiohook.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asterisk/audiohook.h b/include/asterisk/audiohook.h
index 375b2dd9d..cae8cc071 100644
--- a/include/asterisk/audiohook.h
+++ b/include/asterisk/audiohook.h
@@ -63,6 +63,7 @@ enum ast_audiohook_flags {
AST_AUDIOHOOK_SMALL_QUEUE = (1 << 4),
AST_AUDIOHOOK_MUTE_READ = (1 << 5), /*!< audiohook should be mute frames read */
AST_AUDIOHOOK_MUTE_WRITE = (1 << 6), /*!< audiohook should be mute frames written */
+ AST_AUDIOHOOK_COMPATIBLE = (1 << 7), /*!< is the audiohook native slin compatible */
};
enum ast_audiohook_init_flags {