mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
The Eurostar Commit! (it's amazing how much work you can get done on a 150 minute train ride from Paris to London <G>)
support the new location for zaptel.h and tonezone.h use the dependency information output by menuselect to build Makefile rules for each module for header files and libraries combine the common rules into a top-level Makefile.rules file remove all (now) unnecessary stuff from subdir Makefiles change translator API so that the newpvt() callback returns an int instead of a pointer (it no longer allocates memory) alphabetize --with-<foo> options in configure script enhance Net-SNMP support in configure script to provide a --with-netsnmp option fix support for --with-pq so that if pg-config is not found when --with-pq is specified, an error will be generated add 'optional package' usage to modules now that menuselect can output it allow res_snmp to build by default, since the new loader changes coming soon will solve the function naming problem (and users can disable it via menuselect anyway) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -103,17 +103,16 @@ struct speex_coder_pvt {
|
||||
};
|
||||
|
||||
|
||||
static void *lintospeex_new(struct ast_trans_pvt *pvt)
|
||||
static int lintospeex_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct speex_coder_pvt *tmp = pvt->pvt;
|
||||
|
||||
if (!(tmp->speex = speex_encoder_init(&speex_nb_mode)))
|
||||
return NULL;
|
||||
return -1;
|
||||
|
||||
speex_bits_init(&tmp->bits);
|
||||
speex_bits_reset(&tmp->bits);
|
||||
speex_encoder_ctl(tmp->speex, SPEEX_GET_FRAME_SIZE, &tmp->framesize);
|
||||
ast_log(LOG_WARNING, "speex framesize is %d\n", tmp->framesize);
|
||||
speex_encoder_ctl(tmp->speex, SPEEX_SET_COMPLEXITY, &complexity);
|
||||
#ifdef _SPEEX_TYPES_H
|
||||
if (preproc) {
|
||||
@@ -142,20 +141,22 @@ static void *lintospeex_new(struct ast_trans_pvt *pvt)
|
||||
speex_encoder_ctl(tmp->speex, SPEEX_SET_DTX, &dtx);
|
||||
tmp->silent_state = 0;
|
||||
|
||||
return tmp;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void *speextolin_new(struct ast_trans_pvt *pvt)
|
||||
static int speextolin_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct speex_coder_pvt *tmp = pvt->pvt;
|
||||
|
||||
if (!(tmp->speex = speex_decoder_init(&speex_nb_mode)))
|
||||
return NULL;
|
||||
return -1;
|
||||
|
||||
speex_bits_init(&tmp->bits);
|
||||
speex_decoder_ctl(tmp->speex, SPEEX_GET_FRAME_SIZE, &tmp->framesize);
|
||||
if (enhancement)
|
||||
speex_decoder_ctl(tmp->speex, SPEEX_SET_ENH, &enhancement);
|
||||
return tmp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ast_frame *lintospeex_sample(void)
|
||||
|
Reference in New Issue
Block a user