mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user