120 vi = datastore->
data;
186 vi = datastore->
data;
195 if (!strcasecmp(
args.direction,
"tx")) {
197 }
else if (!strcasecmp(
args.direction,
"rx")) {
204 datastore->
data = vi;
249 vi = datastore->
data;
258 if (!strcasecmp(
args.direction,
"tx")) {
259 snprintf(buffer, buflen,
"%f", vi->
tx_gain);
260 }
else if (!strcasecmp(
args.direction,
"rx")) {
261 snprintf(buffer, buflen,
"%f", vi->
rx_gain);
static struct ast_custom_function volume_function
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk main include file. File version handling, generic pbx functions.
static const struct ast_app_option volume_opts[128]
#define ast_test_flag(p, flag)
#define ast_set_flag(p, flag)
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
Structure for a data store type.
int ast_audiohook_attach(struct ast_channel *chan, struct ast_audiohook *audiohook)
Attach audiohook to channel.
static void destroy_callback(void *data)
Structure for a data store object.
struct ast_datastore * ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid)
Find a datastore on a channel.
int ast_audiohook_destroy(struct ast_audiohook *audiohook)
Destroys an audiohook structure.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
int ast_datastore_free(struct ast_datastore *datastore)
Free a data store object.
struct ast_frame_subclass subclass
#define ast_strlen_zero(foo)
int ast_frame_adjust_volume_float(struct ast_frame *f, float adjustment)
Adjusts the volume of the audio samples contained in a frame.
#define AST_APP_OPTIONS(holder, options...)
Declares an array of options for an application.
ast_audiohook_manipulate_callback manipulate_callback
int ast_audiohook_init(struct ast_audiohook *audiohook, enum ast_audiohook_type type, const char *source, enum ast_audiohook_init_flags flags)
Initialize an audiohook structure.
#define ast_audiohook_unlock(ah)
Unlock an audiohook.
static const struct ast_datastore_info volume_datastore
Static structure for datastore information.
General Asterisk PBX channel definitions.
Data structure associated with a custom dialplan function.
int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags *flags, char **args, char *optstr)
Parses a string containing application options and sets flags/arguments.
Core PBX routines and definitions.
int ast_audiohook_detach(struct ast_audiohook *audiohook)
Detach audiohook from channel.
static int load_module(void)
#define ast_channel_unlock(chan)
static int unload_module(void)
#define ast_calloc(num, len)
A wrapper for calloc()
static int volume_read(struct ast_channel *chan, const char *cmd, char *data, char *buffer, size_t buflen)
Structure used to handle boolean flags.
static int volume_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
static int volume_callback(struct ast_audiohook *audiohook, struct ast_channel *chan, struct ast_frame *frame, enum ast_audiohook_direction direction)
Data structure associated with a single frame of data.
enum ast_audiohook_status status
#define ast_datastore_alloc(info, uid)
enum ast_frame_type frametype
#define AST_APP_OPTION(option, flagno)
Declares an application option that does not accept an argument.
#define ASTERISK_GPL_KEY
The text the key() function should return.
#define ast_audiohook_lock(ah)
Lock an audiohook.
Asterisk module definitions.
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
#define ast_custom_function_register(acf)
Register a custom function.
#define AST_APP_ARG(name)
Define an application argument.