changeset 883:ef5d1ab14218

using alaw.h instead of alaw.c
author arpi_esp
date Fri, 25 May 2001 18:26:24 +0000
parents 6d9ceb757640
children 83b5359aee63
files dec_audio.c
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/dec_audio.c	Fri May 25 18:26:01 2001 +0000
+++ b/dec_audio.c	Fri May 25 18:26:24 2001 +0000
@@ -25,7 +25,8 @@
 #include "mp3lib/mp3.h"
 #include "libac3/ac3.h"
 
-#include "alaw.c"
+#include "alaw.h"
+
 #include "xa/xa_gsm.h"
 
 #include "loader/DirectShow/DS_AudioDec.h"
@@ -202,10 +203,6 @@
 }
 case 5: {
   // aLaw audio codec:
-  if(sh_audio->format==6)
-    Gen_aLaw_2_Signed(); // init table
-  else
-    Gen_uLaw_2_Signed(); // init table
   sh_audio->channels=sh_audio->wf->nChannels;
   sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
   sh_audio->i_bps=sh_audio->channels*sh_audio->samplerate;
@@ -290,10 +287,10 @@
         len=2*l;
         if(sh_audio->format==6){
         // aLaw
-          while(l>0){ --l; d[l]=xa_alaw_2_sign[s[l]]; }
+          while(l>0){ --l; d[l]=alaw2short[s[l]]; }
         } else {
         // uLaw
-          while(l>0){ --l; d[l]=xa_ulaw_2_sign[s[l]]; }
+          while(l>0){ --l; d[l]=ulaw2short[s[l]]; }
         }
         break;
       }