Binaural synthesis (confbridge): interleaved two-channel audio.

Asterisk only supports mono audio at the moment.
This patch adds interleaved two-channel audio to Asterisk's channels.

ASTERISK-26292

Change-Id: I7a547cea0fd3c6d1e502709d9e7e39605035757a
This commit is contained in:
frahaase
2016-08-12 18:22:02 +02:00
committed by Dennis Guse
parent e711e57106
commit c455823657
3 changed files with 44 additions and 9 deletions

View File

@@ -2016,6 +2016,16 @@ int ast_set_write_format_from_cap(struct ast_channel *chan, struct ast_format_ca
*/
int ast_set_write_format(struct ast_channel *chan, struct ast_format *format);
/*!
* \brief Sets write format for a channel.
* All internal data will than be handled in an interleaved format. (needed by binaural opus)
*
* \param chan channel to change
* \param format format to set for writing
* \return Returns 0 on success, -1 on failure
*/
int ast_set_write_format_interleaved_stereo(struct ast_channel *chan, struct ast_format *format);
/*!
* \brief Sends text to a channel
*

View File

@@ -231,6 +231,7 @@ struct ast_trans_pvt {
* explicit_dst contains an attribute which describes whether both parties
* want to do forward-error correction (FEC). */
struct ast_format *explicit_dst;
int interleaved_stereo; /*!< indicates if samples are in interleaved order, for stereo lin */
};
/*! \brief generic frameout function */