From 094c26aa689664177e156d17bf5e9ab67c442a53 Mon Sep 17 00:00:00 2001 From: frahaase Date: Fri, 12 Aug 2016 18:23:18 +0200 Subject: Binaural synthesis (confbridge): Adds binaural synthesis to bridge_softmix. Adds binaural synthesis to bridge_softmix (via convolution using libfftw3). Binaural synthesis is conducted at 48kHz. For a conference, only one spatial representation is rendered. The default rendering is applied for mono-capable channels. ASTERISK-26292 Change-Id: Iecdb381b6adc17c961049658678f6219adae1ddf --- include/asterisk/autoconfig.h.in | 7 ++++--- include/asterisk/bridge.h | 10 ++++++++++ include/asterisk/bridge_channel.h | 11 +++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in index eecd957fa..b9b4e1f81 100644 --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -124,6 +124,10 @@ /* Define to 1 if you have the Bluetooth library. */ #undef HAVE_BLUETOOTH +/* Define to 1 if you have the file `bridges/bridge_softmix/include/hrirs.h'. + */ +#undef HAVE_BRIDGES_BRIDGE_SOFTMIX_INCLUDE_HRIRS_H + /* Define to 1 if byteswap.h macros are available. */ #undef HAVE_BYTESWAP_H @@ -236,9 +240,6 @@ /* Define to 1 if you have the `ffsll' function. */ #undef HAVE_FFSLL -/* Define 1 if your system has fftw. */ -#undef HAVE_FFTW - /* Define to 1 if you have the LIBFFTW3 library. */ #undef HAVE_FFTW3 diff --git a/include/asterisk/bridge.h b/include/asterisk/bridge.h index 61cecbdd6..ffe08da13 100644 --- a/include/asterisk/bridge.h +++ b/include/asterisk/bridge.h @@ -263,6 +263,8 @@ struct ast_bridge_softmix { * for itself. */ unsigned int internal_mixing_interval; + /*! TRUE if binaural convolve is activated in configuration. */ + unsigned int binaural_active; }; /*! @@ -867,6 +869,14 @@ void ast_bridge_set_internal_sample_rate(struct ast_bridge *bridge, unsigned int */ void ast_bridge_set_mixing_interval(struct ast_bridge *bridge, unsigned int mixing_interval); +/*! + * \brief Activates the use of binaural signals in a conference bridge. + * + * \param bridge Channel to activate the binaural signals. + * \param binaural_active If true binaural signal processing will be active for the bridge. + */ +void ast_bridge_set_binaural_active(struct ast_bridge *bridge, unsigned int binaural_active); + /*! * \brief Set a bridge to feed a single video source to all participants. */ diff --git a/include/asterisk/bridge_channel.h b/include/asterisk/bridge_channel.h index 797be4ebc..a7971df27 100644 --- a/include/asterisk/bridge_channel.h +++ b/include/asterisk/bridge_channel.h @@ -172,6 +172,17 @@ struct ast_bridge_channel { /*! Collected DTMF digits for DTMF hooks. */ char collected[MAXIMUM_DTMF_FEATURE_STRING]; } dtmf_hook_state; + union { + uint32_t raw; + struct { + /*! TRUE if binaural is suspended. */ + unsigned int binaural_suspended:1; + /*! TRUE if a change of binaural positions has to be performed. */ + unsigned int binaural_pos_change:1; + /*! Padding */ + unsigned int padding:30; + }; + }; }; /*! -- cgit v1.2.3