[asterisk-commits] qwell: trunk r110132 - in /trunk: channels/ include/asterisk/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 19 16:56:15 CDT 2008
Author: qwell
Date: Wed Mar 19 16:56:15 2008
New Revision: 110132
URL: http://svn.digium.com/view/asterisk?view=rev&rev=110132
Log:
Rename very poorly named function to reflect what it actually does. This was causing quite a bit of confusion for me...
Modified:
trunk/channels/chan_mgcp.c
trunk/channels/chan_sip.c
trunk/channels/chan_usbradio.c
trunk/channels/chan_vpb.cc
trunk/channels/chan_zap.c
trunk/include/asterisk/dsp.h
trunk/main/dsp.c
Modified: trunk/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_mgcp.c?view=diff&rev=110132&r1=110131&r2=110132
==============================================================================
--- trunk/channels/chan_mgcp.c (original)
+++ trunk/channels/chan_mgcp.c Wed Mar 19 16:56:15 2008
@@ -1513,7 +1513,7 @@
i->dsp = ast_dsp_new();
ast_dsp_set_features(i->dsp,DSP_FEATURE_DTMF_DETECT);
/* this is to prevent clipping of dtmf tones during dsp processing */
- ast_dsp_digitmode(i->dsp, DSP_DIGITMODE_NOQUELCH);
+ ast_dsp_set_digitmode(i->dsp, DSP_DIGITMODE_NOQUELCH);
} else {
i->dsp = NULL;
}
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=110132&r1=110131&r2=110132
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Mar 19 16:56:15 2008
@@ -5319,7 +5319,7 @@
i->vad = ast_dsp_new();
ast_dsp_set_features(i->vad, DSP_FEATURE_DTMF_DETECT);
if (global_relaxdtmf)
- ast_dsp_digitmode(i->vad, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_RELAXDTMF);
+ ast_dsp_set_digitmode(i->vad, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_RELAXDTMF);
}
/* Set file descriptors for audio, video, realtime text and UDPTL as needed */
Modified: trunk/channels/chan_usbradio.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_usbradio.c?view=diff&rev=110132&r1=110131&r2=110132
==============================================================================
--- trunk/channels/chan_usbradio.c (original)
+++ trunk/channels/chan_usbradio.c Wed Mar 19 16:56:15 2008
@@ -2285,7 +2285,7 @@
o->dsp = ast_dsp_new();
if (o->dsp) {
ast_dsp_set_features(o->dsp, DSP_FEATURE_DTMF_DETECT);
- ast_dsp_digitmode(o->dsp, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_RELAXDTMF);
+ ast_dsp_set_digitmode(o->dsp, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_RELAXDTMF);
}
if (o->rxctcssfreq != 0 && o->rxdemod == RX_AUDIO_SPEAKER)
Modified: trunk/channels/chan_vpb.cc
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_vpb.cc?view=diff&rev=110132&r1=110131&r2=110132
==============================================================================
--- trunk/channels/chan_vpb.cc (original)
+++ trunk/channels/chan_vpb.cc Wed Mar 19 16:56:15 2008
@@ -1634,9 +1634,9 @@
if (use_ast_dtmfdet) {
tmp->vad = ast_dsp_new();
ast_dsp_set_features(tmp->vad, DSP_FEATURE_DTMF_DETECT);
- ast_dsp_digitmode(tmp->vad, DSP_DIGITMODE_DTMF);
+ ast_dsp_set_digitmode(tmp->vad, DSP_DIGITMODE_DTMF);
if (relaxdtmf)
- ast_dsp_digitmode(tmp->vad, DSP_DIGITMODE_DTMF|DSP_DIGITMODE_RELAXDTMF);
+ ast_dsp_set_digitmode(tmp->vad, DSP_DIGITMODE_DTMF|DSP_DIGITMODE_RELAXDTMF);
} else {
tmp->vad = NULL;
}
Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=110132&r1=110131&r2=110132
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Wed Mar 19 16:56:15 2008
@@ -3000,7 +3000,7 @@
p->origcid_name = NULL;
}
if (p->dsp)
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
if (p->exten)
p->exten[0] = '\0';
@@ -3452,15 +3452,15 @@
switch (*cp) {
case 1:
ast_debug(1, "Set option TONE VERIFY, mode: MUTECONF(1) on %s\n",chan->name);
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MUTECONF | p->dtmfrelax); /* set mute mode if desired */
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MUTECONF | p->dtmfrelax); /* set mute mode if desired */
break;
case 2:
ast_debug(1, "Set option TONE VERIFY, mode: MUTECONF/MAX(2) on %s\n",chan->name);
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_MUTEMAX | p->dtmfrelax); /* set mute mode if desired */
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_MUTEMAX | p->dtmfrelax); /* set mute mode if desired */
break;
default:
ast_debug(1, "Set option TONE VERIFY, mode: OFF(0) on %s\n",chan->name);
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax); /* set mute mode if desired */
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); /* set mute mode if desired */
break;
}
break;
@@ -3543,7 +3543,7 @@
cp = (char *) data;
ast_debug(1, "Set option RELAX DTMF, value: %s(%d) on %s\n",
*cp ? "ON" : "OFF", (int) *cp, chan->name);
- ast_dsp_digitmode(p->dsp, ((*cp) ? DSP_DIGITMODE_RELAXDTMF : DSP_DIGITMODE_DTMF) | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, ((*cp) ? DSP_DIGITMODE_RELAXDTMF : DSP_DIGITMODE_DTMF) | p->dtmfrelax);
break;
case AST_OPTION_AUDIO_MODE: /* Set AUDIO mode (or not) */
cp = (char *) data;
@@ -5930,7 +5930,7 @@
}
#endif
ast_dsp_set_features(i->dsp, features);
- ast_dsp_digitmode(i->dsp, DSP_DIGITMODE_DTMF | i->dtmfrelax);
+ ast_dsp_set_digitmode(i->dsp, DSP_DIGITMODE_DTMF | i->dtmfrelax);
if (!ast_strlen_zero(progzone))
ast_dsp_set_call_progress_zone(i->dsp, progzone);
if (i->busydetect && CANBUSYDETECT(i)) {
@@ -6203,9 +6203,9 @@
/* set digit mode appropriately */
if (p->dsp) {
if (NEED_MFDETECT(p))
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MF | p->dtmfrelax);
else
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
}
memset(dtmfbuf, 0, sizeof(dtmfbuf));
/* Wait for the first digit only if immediate=no */
@@ -6319,14 +6319,14 @@
return NULL;
}
zt_set_hook(p->subs[SUB_REAL].zfd, ZT_OFFHOOK);
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MF | p->dtmfrelax);
res = my_getsigstr(chan, anibuf, "#", 10000);
if ((res > 0) && (strlen(anibuf) > 2)) {
if (anibuf[strlen(anibuf) - 1] == '#')
anibuf[strlen(anibuf) - 1] = 0;
ast_set_callerid(chan, anibuf + 2, NULL, anibuf + 2);
}
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
}
ast_copy_string(exten, dtmfbuf, sizeof(exten));
@@ -6411,7 +6411,7 @@
if (NEED_MFDETECT(p)) {
if (p->dsp) {
if (!p->hardwaredtmf)
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
else {
ast_dsp_free(p->dsp);
p->dsp = NULL;
@@ -8512,7 +8512,7 @@
if (tmp->subs[SUB_REAL].zfd > -1) {
set_actual_gain(tmp->subs[SUB_REAL].zfd, 0, tmp->rxgain, tmp->txgain, tmp->law);
if (tmp->dsp)
- ast_dsp_digitmode(tmp->dsp, DSP_DIGITMODE_DTMF | tmp->dtmfrelax);
+ ast_dsp_set_digitmode(tmp->dsp, DSP_DIGITMODE_DTMF | tmp->dtmfrelax);
update_conf(tmp);
if (!here) {
if ((conf.chan.sig != SIG_BRI) && (conf.chan.sig != SIG_BRI_PTMP) && (conf.chan.sig != SIG_PRI) && (conf.chan.sig != SIG_SS7))
Modified: trunk/include/asterisk/dsp.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/dsp.h?view=diff&rev=110132&r1=110131&r2=110132
==============================================================================
--- trunk/include/asterisk/dsp.h (original)
+++ trunk/include/asterisk/dsp.h Wed Mar 19 16:56:15 2008
@@ -115,7 +115,7 @@
int ast_dsp_getdigits(struct ast_dsp *dsp, char *buf, int max);
/*! \brief Set digit mode */
-int ast_dsp_digitmode(struct ast_dsp *dsp, int digitmode);
+int ast_dsp_set_digitmode(struct ast_dsp *dsp, int digitmode);
/*! \brief Set fax mode */
int ast_dsp_set_faxmode(struct ast_dsp *dsp, int faxmode);
Modified: trunk/main/dsp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/dsp.c?view=diff&rev=110132&r1=110131&r2=110132
==============================================================================
--- trunk/main/dsp.c (original)
+++ trunk/main/dsp.c Wed Mar 19 16:56:15 2008
@@ -1495,7 +1495,7 @@
dsp->ringtimeout= 0;
}
-int ast_dsp_digitmode(struct ast_dsp *dsp, int digitmode)
+int ast_dsp_set_digitmode(struct ast_dsp *dsp, int digitmode)
{
int new;
int old;
More information about the asterisk-commits
mailing list