summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJulian Lyndon-Smith <julian@dotr.com>2010-04-21 11:27:27 +0000
committerJulian Lyndon-Smith <julian@dotr.com>2010-04-21 11:27:27 +0000
commitd85650e4aa89fe72850aad21fa25dd3fb3b05019 (patch)
tree0ab377462883dca1275581d02f2266f58e8fbb02 /include
parentea9186d4ea4e58c51e12718ed64c4964546f552f (diff)
Added MixMonitorMute manager command
Added a new manager command to mute/unmute MixMonitor audio on a channel. Added a new feature to audiohooks so that you can mute either read / write (or both) types of frames - this allows for MixMonitor to mute either side of the conversation without affecting the conversation itself. (closes issue #16740) Reported by: jmls Review: https://reviewboard.asterisk.org/r/487/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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