aboutsummaryrefslogtreecommitdiffstats
path: root/ulaw.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-12-07 22:57:34 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-12-07 22:57:34 +0000
commitafbca6b478628803ab7a9768c8b7bf3c846e3b01 (patch)
treeabb0e18c8355f757f2621516d64d71fbf88cb2f4 /ulaw.c
parent3607024782adf8abf822c89bb2198d6157528b1e (diff)
Version 0.1.10 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@390 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'ulaw.c')
-rwxr-xr-xulaw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ulaw.c b/ulaw.c
index 0684e47de..2f90d2116 100755
--- a/ulaw.c
+++ b/ulaw.c
@@ -17,8 +17,8 @@
#define BIAS 0x84 /* define the add-in bias for 16 bit samples */
#define CLIP 32635
-unsigned char ast_lin2mu[65536];
-short ast_mulaw[256];
+unsigned char __ast_lin2mu[16384];
+short __ast_mulaw[256];
static unsigned char
linear2ulaw(short sample)
@@ -76,12 +76,12 @@ void ast_ulaw_init(void)
y = f * (1 << (e + 3));
y += etab[e];
if (mu & 0x80) y = -y;
- ast_mulaw[i] = y;
+ __ast_mulaw[i] = y;
}
/* set up the reverse (mu-law) conversion table */
- for(i = 0; i < 65536; i++)
+ for(i = -32768; i < 32768; i++)
{
- ast_lin2mu[i] = linear2ulaw(i - 32768);
+ __ast_lin2mu[((unsigned short)i) >> 2] = linear2ulaw(i);
}
}