mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-23 04:58:48 +00:00
Code formatting cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -24,8 +24,6 @@ static int abr = 0;
|
|||||||
static int abr_quality = 0;
|
static int abr_quality = 0;
|
||||||
static int dtx = 0;
|
static int dtx = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define TYPE_SILENCE 0x2
|
#define TYPE_SILENCE 0x2
|
||||||
#define TYPE_HIGH 0x0
|
#define TYPE_HIGH 0x0
|
||||||
#define TYPE_LOW 0x1
|
#define TYPE_LOW 0x1
|
||||||
@@ -99,7 +97,6 @@ static struct ast_translator_pvt *lintospeex_new(void)
|
|||||||
speex_encoder_ctl(tmp->speex, SPEEX_SET_VBR, &abr);
|
speex_encoder_ctl(tmp->speex, SPEEX_SET_VBR, &abr);
|
||||||
speex_encoder_ctl(tmp->speex, SPEEX_SET_VBR_QUALITY, &abr_quality);
|
speex_encoder_ctl(tmp->speex, SPEEX_SET_VBR_QUALITY, &abr_quality);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp->tail = 0;
|
tmp->tail = 0;
|
||||||
}
|
}
|
||||||
localusecnt++;
|
localusecnt++;
|
||||||
@@ -305,10 +302,12 @@ static struct ast_translator lintospeex =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void parse_config(void) {
|
static void parse_config(void)
|
||||||
|
{
|
||||||
struct ast_config *cfg;
|
struct ast_config *cfg;
|
||||||
struct ast_variable *var;
|
struct ast_variable *var;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
if ((cfg = ast_load("codecs.conf"))) {
|
if ((cfg = ast_load("codecs.conf"))) {
|
||||||
if ((var = ast_variable_browse(cfg, "speex"))) {
|
if ((var = ast_variable_browse(cfg, "speex"))) {
|
||||||
while (var) {
|
while (var) {
|
||||||
@@ -320,8 +319,8 @@ static void parse_config(void) {
|
|||||||
ast_mutex_lock(&localuser_lock);
|
ast_mutex_lock(&localuser_lock);
|
||||||
quality = res;
|
quality = res;
|
||||||
ast_mutex_unlock(&localuser_lock);
|
ast_mutex_unlock(&localuser_lock);
|
||||||
} else ast_log(LOG_ERROR,"Error Quality must be 0-10\n");
|
} else
|
||||||
|
ast_log(LOG_ERROR,"Error Quality must be 0-10\n");
|
||||||
} else if (!strcasecmp(var->name, "complexity")) {
|
} else if (!strcasecmp(var->name, "complexity")) {
|
||||||
res = abs(atoi(var->value));
|
res = abs(atoi(var->value));
|
||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
@@ -330,7 +329,8 @@ static void parse_config(void) {
|
|||||||
ast_mutex_lock(&localuser_lock);
|
ast_mutex_lock(&localuser_lock);
|
||||||
complexity = res;
|
complexity = res;
|
||||||
ast_mutex_unlock(&localuser_lock);
|
ast_mutex_unlock(&localuser_lock);
|
||||||
} else ast_log(LOG_ERROR,"Error! Complexity must be 0-10\n");
|
} else
|
||||||
|
ast_log(LOG_ERROR,"Error! Complexity must be 0-10\n");
|
||||||
} else if (!strcasecmp(var->name, "vbr_quality")) {
|
} else if (!strcasecmp(var->name, "vbr_quality")) {
|
||||||
res = abs(atoi(var->value));
|
res = abs(atoi(var->value));
|
||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
@@ -339,7 +339,8 @@ static void parse_config(void) {
|
|||||||
ast_mutex_lock(&localuser_lock);
|
ast_mutex_lock(&localuser_lock);
|
||||||
vbr_quality = res;
|
vbr_quality = res;
|
||||||
ast_mutex_unlock(&localuser_lock);
|
ast_mutex_unlock(&localuser_lock);
|
||||||
} else ast_log(LOG_ERROR,"Error! VBR Quality must be 0-10\n");
|
} else
|
||||||
|
ast_log(LOG_ERROR,"Error! VBR Quality must be 0-10\n");
|
||||||
} else if (!strcasecmp(var->name, "abr_quality")) {
|
} else if (!strcasecmp(var->name, "abr_quality")) {
|
||||||
res = abs(atoi(var->value));
|
res = abs(atoi(var->value));
|
||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
@@ -348,8 +349,8 @@ static void parse_config(void) {
|
|||||||
ast_mutex_lock(&localuser_lock);
|
ast_mutex_lock(&localuser_lock);
|
||||||
abr_quality = res;
|
abr_quality = res;
|
||||||
ast_mutex_unlock(&localuser_lock);
|
ast_mutex_unlock(&localuser_lock);
|
||||||
} else ast_log(LOG_ERROR,"Error! ABR Quality must be 0-10\n");
|
} else
|
||||||
|
ast_log(LOG_ERROR,"Error! ABR Quality must be 0-10\n");
|
||||||
} else if (!strcasecmp(var->name, "enhancement")) {
|
} else if (!strcasecmp(var->name, "enhancement")) {
|
||||||
ast_mutex_lock(&localuser_lock);
|
ast_mutex_lock(&localuser_lock);
|
||||||
enhancement = ast_true(var->value) ? 1 : 0;
|
enhancement = ast_true(var->value) ? 1 : 0;
|
||||||
@@ -387,7 +388,8 @@ static void parse_config(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int reload(void) {
|
int reload(void)
|
||||||
|
{
|
||||||
parse_config();
|
parse_config();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user