summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/audiohook.h12
-rw-r--r--include/asterisk/frame.h5
2 files changed, 17 insertions, 0 deletions
diff --git a/include/asterisk/audiohook.h b/include/asterisk/audiohook.h
index 91081ce08..b1e77f8a8 100644
--- a/include/asterisk/audiohook.h
+++ b/include/asterisk/audiohook.h
@@ -62,6 +62,8 @@ enum ast_audiohook_flags {
* slinfactories. We will flush the factories if they contain too many samples.
*/
AST_AUDIOHOOK_SMALL_QUEUE = (1 << 3),
+ AST_AUDIOHOOK_MUTE_READ = (1 << 4), /*!< audiohook should be mute frames read */
+ AST_AUDIOHOOK_MUTE_WRITE = (1 << 5), /*!< audiohook should be mute frames written */
};
#define AST_AUDIOHOOK_SYNC_TOLERANCE 100 /*< Tolerance in milliseconds for audiohooks synchronization */
@@ -277,6 +279,16 @@ int ast_audiohook_volume_get(struct ast_channel *chan, enum ast_audiohook_direct
*/
int ast_audiohook_volume_adjust(struct ast_channel *chan, enum ast_audiohook_direction direction, int volume);
+/*! \brief Mute frames read from or written to a channel
+ * \param chan Channel to muck with
+ * \param source Type of audiohook
+ * \param flag which direction to set / clear
+ * \param clear set or clear muted frames on direction based on flag parameter
+ * \retval 0 success
+ * \retval -1 failure
+ */
+int ast_audiohook_set_mute(struct ast_channel *chan, const char *source, enum ast_audiohook_flags flag, int clear);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index 68a0c7eb6..0d8d557d2 100644
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -728,6 +728,11 @@ static force_inline int ast_format_rate(format_t format)
}
}
+/*!
+ * \brief Clear all audio samples from an ast_frame. The frame must be AST_FRAME_VOICE and AST_FORMAT_SLINEAR
+ */
+int ast_frame_clear(struct ast_frame *frame);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif