www.pudn.com > MyPlayerbylqh.rar > Layer1.cpp


 
 
#include "mpg123.h" 
 
 
/** 
 * 
 **/ 
 
static void I_step_one (unsigned int balloc[], unsigned int scale_index[2][SBLIMIT],struct frame *fr) 
{ 
	unsigned int *ba=balloc; 
	unsigned int *sca = (unsigned int *) scale_index; 
 
	if(fr->stereo) { 
		int i; 
		int jsbound = fr->jsbound; 
 
		for (i=0;istereo) { 
		int jsbound = fr->jsbound; 
		register real *f0 = fraction[0]; 
		register real *f1 = fraction[1]; 
		ba = balloc; 
 
		for (sample=smpb,i=0;istereo; 
	unsigned int balloc[2*SBLIMIT]; 
	unsigned int scale_index[2][SBLIMIT]; 
	real fraction[2][SBLIMIT]; 
	int single = fr->single; 
 
	fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? (fr->mode_ext<<2)+4 : 32; 
 
	if(stereo == 1 || single == 3) 
		single = 0; 
 
	I_step_one (balloc,scale_index,fr); 
 
	for (i=0;i= 0) { 
        clip += synth_1to1_mono( (real*)fraction[single],pcm_sample,pcm_point); 
      } 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); 
      } 
  } 
 
  return clip; 
}