aboutsummaryrefslogtreecommitdiffstats
path: root/main/indications.c
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-10 20:23:50 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-10 20:23:50 +0000
commit9ae91f799ab15938b69b072b681fb606286d08ea (patch)
treeb55253e4a6cb86147db48091cca0af756faf2ed4 /main/indications.c
parent8cb986b936ea0cee5af2dccf467fe1fc5b89414b (diff)
Another batch of files from RSW. The remaining apps and a few more
files from main/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137089 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/indications.c')
-rw-r--r--main/indications.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/main/indications.c b/main/indications.c
index f75f27bad..edde12a90 100644
--- a/main/indications.c
+++ b/main/indications.c
@@ -233,55 +233,55 @@ int ast_playtones_start(struct ast_channel *chan, int vol, const char *playlst,
separator = ",";
s = strsep(&stringp,separator);
while (s && *s) {
- int freq1, freq2, time, modulate = 0, midinote = 0;
+ int freq1, freq2, duration, modulate = 0, midinote = 0;
if (s[0]=='!')
s++;
else if (d.reppos == -1)
d.reppos = d.nitems;
- if (sscanf(s, "%d+%d/%d", &freq1, &freq2, &time) == 3) {
+ if (sscanf(s, "%d+%d/%d", &freq1, &freq2, &duration) == 3) {
/* f1+f2/time format */
} else if (sscanf(s, "%d+%d", &freq1, &freq2) == 2) {
/* f1+f2 format */
- time = 0;
- } else if (sscanf(s, "%d*%d/%d", &freq1, &freq2, &time) == 3) {
+ duration = 0;
+ } else if (sscanf(s, "%d*%d/%d", &freq1, &freq2, &duration) == 3) {
/* f1*f2/time format */
modulate = 1;
} else if (sscanf(s, "%d*%d", &freq1, &freq2) == 2) {
/* f1*f2 format */
- time = 0;
+ duration = 0;
modulate = 1;
- } else if (sscanf(s, "%d/%d", &freq1, &time) == 2) {
+ } else if (sscanf(s, "%d/%d", &freq1, &duration) == 2) {
/* f1/time format */
freq2 = 0;
} else if (sscanf(s, "%d", &freq1) == 1) {
/* f1 format */
freq2 = 0;
- time = 0;
- } else if (sscanf(s, "M%d+M%d/%d", &freq1, &freq2, &time) == 3) {
+ duration = 0;
+ } else if (sscanf(s, "M%d+M%d/%d", &freq1, &freq2, &duration) == 3) {
/* Mf1+Mf2/time format */
midinote = 1;
} else if (sscanf(s, "M%d+M%d", &freq1, &freq2) == 2) {
/* Mf1+Mf2 format */
- time = 0;
+ duration = 0;
midinote = 1;
- } else if (sscanf(s, "M%d*M%d/%d", &freq1, &freq2, &time) == 3) {
+ } else if (sscanf(s, "M%d*M%d/%d", &freq1, &freq2, &duration) == 3) {
/* Mf1*Mf2/time format */
modulate = 1;
midinote = 1;
} else if (sscanf(s, "M%d*M%d", &freq1, &freq2) == 2) {
/* Mf1*Mf2 format */
- time = 0;
+ duration = 0;
modulate = 1;
midinote = 1;
- } else if (sscanf(s, "M%d/%d", &freq1, &time) == 2) {
+ } else if (sscanf(s, "M%d/%d", &freq1, &duration) == 2) {
/* Mf1/time format */
freq2 = -1;
midinote = 1;
} else if (sscanf(s, "M%d", &freq1) == 1) {
/* Mf1 format */
freq2 = -1;
- time = 0;
+ duration = 0;
midinote = 1;
} else {
ast_log(LOG_WARNING,"%s: tone component '%s' of '%s' is no good\n",chan->name,s,playlst);
@@ -311,7 +311,7 @@ int ast_playtones_start(struct ast_channel *chan, int vol, const char *playlst,
d.items[d.nitems].fac2 = 2.0 * cos(2.0 * M_PI * (freq2 / 8000.0)) * 32768.0;
d.items[d.nitems].init_v2_2 = sin(-4.0 * M_PI * (freq2 / 8000.0)) * d.vol;
d.items[d.nitems].init_v3_2 = sin(-2.0 * M_PI * (freq2 / 8000.0)) * d.vol;
- d.items[d.nitems].duration = time;
+ d.items[d.nitems].duration = duration;
d.items[d.nitems].modulate = modulate;
d.nitems++;