public static void OPNB_ADPCM_CALC_CHA( YM2610 F2610, ADPCM_CH ch )
{
	int/*UINT32*/ step;
	int data;

	ch.now_step += ch.step;
	if ( ch.now_step >= (1<<ADPCM_SHIFT) )
	{
		step = ch.now_step >> ADPCM_SHIFT;
		ch.now_step &= (1<<ADPCM_SHIFT)-1;
		/* end check */
		if ( (ch.now_addr+step) > (ch.end<<1) ) {
			ch.flag = 0;
			F2610.adpcm_arrivedEndAddress |= ch.flagMask;
			return;
		}
		do{
			if( (ch.now_addr&1)!=0 ) data = ch.now_data & 0x0f;
			else
			{
				ch.now_data = pcmbufA.read(ch.now_addr>>1);//*(pcmbufA+(ch.now_addr>>1));
				data = (ch.now_data >> 4)&0x0f;
			}
			ch.now_addr++;

			ch.adpcmx += jedi_table[ch.adpcmd+data];
			//Limit( ch.adpcmx,ADPCMA_DECODE_MAX, ADPCMA_DECODE_MIN );
                        if ( ch.adpcmx > ADPCMA_DECODE_MAX )      ch.adpcmx = ADPCMA_DECODE_MAX; 
                    	else if ( ch.adpcmx < ADPCMA_DECODE_MIN ) ch.adpcmx = ADPCMA_DECODE_MIN;
			ch.adpcmd += decode_tableA1[data];
			//Limit( ch.adpcmd, 48*16, 0*16 );
                        if ( ch.adpcmd > 48*16 )      ch.adpcmd = 48*16; 
                    	else if ( ch.adpcmd < 0*16 ) ch.adpcmd = 0*16;
			/**** calc pcm * volume data ****/
			ch.adpcml = ch.adpcmx * ch.volume;
		}while(--step!=0);
	}
	/* output for work of output channels (out_ch[OPNxxxx])*/
	//*(ch.pan) += ch.adpcml;
        ch.pan.write(ch.pan.read()+ ch.adpcml);
}