aboutsummaryrefslogtreecommitdiffstats
path: root/main/dsp.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-21 21:13:09 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-21 21:13:09 +0000
commit230a66da7d98b2b6d328a04b0e7180b94d9c76bf (patch)
treeb40d978190102dbe6f14458ab8a70f358db533e4 /main/dsp.c
parentd57c20e50d7105f72bb90e709965ad5e04c5e36a (diff)
Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes: - CLI command handlers - CLI command handler arguments - AGI command handlers - AGI command handler arguments - Dialplan application handler arguments - Speech engine API function arguments In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing. Review: https://reviewboard.asterisk.org/r/251/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/dsp.c')
-rw-r--r--main/dsp.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/main/dsp.c b/main/dsp.c
index 6c0b013e4..ab7cacf1a 100644
--- a/main/dsp.c
+++ b/main/dsp.c
@@ -283,24 +283,17 @@ typedef struct
} td;
} digit_detect_state_t;
-static float dtmf_row[] =
-{
+static const float dtmf_row[] = {
697.0, 770.0, 852.0, 941.0
};
-static float dtmf_col[] =
-{
+static const float dtmf_col[] = {
1209.0, 1336.0, 1477.0, 1633.0
};
-
-static float mf_tones[] =
-{
+static const float mf_tones[] = {
700.0, 900.0, 1100.0, 1300.0, 1500.0, 1700.0
};
-
-static char dtmf_positions[] = "123A" "456B" "789C" "*0#D";
-
-static char bell_mf_positions[] = "1247C-358A--69*---0B----#";
-
+static const char dtmf_positions[] = "123A" "456B" "789C" "*0#D";
+static const char bell_mf_positions[] = "1247C-358A--69*---0B----#";
static int thresholds[THRESHOLD_MAX];
static inline void goertzel_sample(goertzel_state_t *s, short sample)