30 #ifndef _ASTERISK_BRIDGE_SOFTMIX_INTERNAL_H 31 #define _ASTERISK_BRIDGE_SOFTMIX_INTERNAL_H 56 #ifdef BINAURAL_RENDERING 60 #if defined(__Darwin__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__CYGWIN__) 66 #define MAX_DATALEN 8096 67 #define DEFAULT_ENERGY_HISTORY_LEN 150 70 #define SOFTMIX_BINAURAL_SAMPLE_RATE 48000 72 #define BINAURAL_MIXING_INTERVAL 20 85 #ifdef BINAURAL_RENDERING 89 fftw_plan fftw_plan_inverse;
214 struct timeval last_video_update;
216 struct timeval last_remb_update;
238 unsigned int default_sample_size);
259 unsigned int in_sample_size,
unsigned int hrtf_length);
274 unsigned int pos_id,
int16_t *in_samples,
unsigned int in_sample_size,
275 const char *channel_name);
289 float *
get_hrir(
unsigned int chan_pos,
unsigned int chan_side);
304 unsigned int chan_pos,
unsigned int chan_side,
unsigned int default_sample_size);
319 unsigned int hrtf_len,
unsigned int chan_pos,
unsigned int default_sample_size);
379 unsigned int default_sample_size);
388 unsigned int default_sample_size);
442 unsigned int softmix_datalen,
unsigned int softmix_samples,
int16_t *
buf);
struct convolve_channel_pair ** chan_pairs
Asterisk main include file. File version handling, generic pbx functions.
float * get_hrir(unsigned int chan_pos, unsigned int chan_side)
Provides a head related impulse response for the given position in the virtual enviroment.
struct ast_stream_topology * topology
Support for translation of data formats. translate.c.
unsigned int default_sample_size
unsigned int binaural_init
unsigned int binaural_pos
struct convolve_channel_pair * our_chan_pair
unsigned int binaural_suspended
void softmix_process_write_binaural_audio(struct softmix_channel *sc, unsigned int default_sample_size)
Writes the binaural audio to a channel.
A REMB feedback message (see draft-alvestrand-rmcat-remb-03 for details)
pthread_cond_t ast_cond_t
unsigned int max_num_entries
void binaural_mixing(struct ast_bridge *bridge, struct softmix_bridge_data *softmix_data, struct softmix_mixing_array *mixing_array, int16_t *bin_buf, int16_t *ann_buf)
Mixes all binaural audio data contained in the mixing array.
void check_binaural_position_change(struct ast_bridge *bridge, struct softmix_bridge_data *softmix_data)
Checks if a position change in the virual enviroment is requested by one of the participants.
int do_convolve(struct convolve_channel *chan, int16_t *in_samples, unsigned int in_sample_size, unsigned int hrtf_length)
Binaural convolving of audio data for a channel.
General Asterisk PBX channel definitions.
void random_binaural_pos_change(struct softmix_bridge_data *softmix_data)
Randomly changes the virtual positions of conference participants.
struct ast_format * read_slin_format
int init_convolve_channel(struct convolve_channel *channel, unsigned int hrtf_len, unsigned int chan_pos, unsigned int chan_side, unsigned int default_sample_size)
Initializes all data needed for binaural audio processing.
Asterisk internal frame definitions.
#define AST_VECTOR(name, type)
Define a vector structure.
unsigned int internal_mixing_interval
unsigned int internal_rate
Structure that contains information about a bridge.
int set_binaural_data_join(struct convolve_data *data, unsigned int default_sample_size)
Joins a channel into a virtual enviroment build with the help of binaural sythesis.
Structure which contains per-channel mixing information.
void create_binaural_frame(struct ast_bridge_channel *bridge_channel, struct softmix_channel *sc, int16_t *bin_buf, int16_t *ann_buf, unsigned int softmix_datalen, unsigned int softmix_samples, int16_t *buf)
Creates a frame out of binaural audio data.
void free_convolve_channel_pair(struct convolve_channel_pair *cchan_pair)
Frees all data needed for binaural processing by a pair of audio channels (left and right)...
A machine to gather up arbitrary frames and convert them to raw slinear on demand.
struct ast_bridge * bridge
Bridge pointer passed to the softmix mixing thread.
int energy_history_cur_slot
int init_convolve_data(struct convolve_data *data, unsigned int default_sample_size)
Preinits a specific number of channels (CONVOVLE_CHANNEL_PREALLOC) at the beginning of a conference...
int init_convolve_channel_pair(struct convolve_channel_pair *cchan_pair, unsigned int hrtf_len, unsigned int chan_pos, unsigned int default_sample_size)
Initializies all data needed for binaural audio processing of a channel pair (left and right)...
Vector container support.
unsigned int talking
TRUE if a channel is talking.
Support for logging to various files, console and syslog Configuration in file logger.conf.
struct convolve_channel_pair ** cchan_pair
Structure that contains information regarding a channel in a bridge.
void set_binaural_data_leave(struct convolve_data *data, unsigned int pos, unsigned int default_sample_size)
Removes a channel from the binaural conference bridge. Marks the position in the virtual room as unus...
Data structure associated with a single frame of data.
Options provided by main asterisk program.
unsigned int is_announcement
void add_binaural_mixing(struct ast_bridge *bridge, struct softmix_bridge_data *softmix_data, unsigned int softmix_samples, struct softmix_mixing_array *mixing_array, struct softmix_channel *sc, const char *channel_name)
Processes audio data with the binaural synthesis and adds the result to the mixing array...
unsigned int used_entries
Pluggable RTP Architecture.
void free_convolve_data(struct convolve_data *data)
Frees all channels and data needed for binaural audio processing.
Asterisk module definitions.
struct convolve_channel_pair * do_convolve_pair(struct convolve_data *data, unsigned int pos_id, int16_t *in_samples, unsigned int in_sample_size, const char *channel_name)
Binaural convolving of audio data for a channel pair (left and right channel).
Timing source management.
struct softmix_remb_collector * remb_collector
Structure for mutex and tracking information.
void reset_channel_pair(struct convolve_channel_pair *channel_pair, unsigned int default_sample_size)
Deletes left over signals on a channel that it can be reused.
#define DEFAULT_ENERGY_HISTORY_LEN
void free_convolve_channel(struct convolve_channel *cchan)
Frees all data needed for binaural processing by an audio channel.