From 3a8facf06d80000c1b6a2e2b5eb8f3f1be909ff5 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Fri, 7 Dec 2001 22:57:34 +0000 Subject: Version 0.1.10 from FTP git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- ulaw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ulaw.c') 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); } } -- cgit v1.2.3