diff options
author | Sean Bright <sean@malleable.com> | 2008-08-10 20:23:50 +0000 |
---|---|---|
committer | Sean Bright <sean@malleable.com> | 2008-08-10 20:23:50 +0000 |
commit | 790fde68d94de4d7e8260f8ffc0923715783555e (patch) | |
tree | b55253e4a6cb86147db48091cca0af756faf2ed4 /main/indications.c | |
parent | b69c8e6ab5b5d20a964d67e93cda8dc07da61fa4 (diff) |
Another batch of files from RSW. The remaining apps and a few more
files from main/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/indications.c')
-rw-r--r-- | main/indications.c | 28 |
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++; |