diff decoders/mpglib/layer1.c @ 279:52b9f37998db

Removed global state variable; should be thread safe now.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 14 Mar 2002 16:38:59 +0000
parents 9b6e82f7c853
children ad4c8f34136a
line wrap: on
line diff
--- a/decoders/mpglib/layer1.c	Thu Mar 14 16:38:32 2002 +0000
+++ b/decoders/mpglib/layer1.c	Thu Mar 14 16:38:59 2002 +0000
@@ -111,7 +111,7 @@
   }
 }
 
-int do_layer1(struct frame *fr,unsigned char *pcm_sample,int *pcm_point)
+int do_layer1(struct frame *fr,unsigned char *pcm_sample,int *pcm_point,struct mpstr *mp)
 {
   int clip=0;
   int i,stereo = fr->stereo;
@@ -132,12 +132,12 @@
     I_step_two(fraction,balloc,scale_index,fr);
 
       if(single >= 0) {
-        clip += synth_1to1_mono( (real*)fraction[single],pcm_sample,pcm_point);
+        clip += synth_1to1_mono( (real*)fraction[single],pcm_sample,pcm_point,mp);
       }
       else {
         int p1 = *pcm_point;
-        clip += synth_1to1( (real*)fraction[0],0,pcm_sample,&p1);
-        clip += synth_1to1( (real*)fraction[1],1,pcm_sample,pcm_point);
+        clip += synth_1to1( (real*)fraction[0],0,pcm_sample,&p1,mp);
+        clip += synth_1to1( (real*)fraction[1],1,pcm_sample,pcm_point,mp);
       }
   }