CSPspEmu.Hle.Formats.audio.At3.MaiAT3PlusCoreDecoder.MAPCDDF_makeL128 C# (CSharp) Method

MAPCDDF_makeL128() private method

private MAPCDDF_makeL128 ( MaiAT3PlusCoreDecoderChnACCTableTable acc5, int acc5_4, int acc5_360, MaiAT3PlusCoreDecoderChnACCTableTable acc6, int acc6_4, int acc6_360, float l128, int chn ) : int
acc5 MaiAT3PlusCoreDecoderChnACCTableTable
acc5_4 int
acc5_360 int
acc6 MaiAT3PlusCoreDecoderChnACCTableTable
acc6_4 int
acc6_360 int
l128 float
chn int
return int
        int MAPCDDF_makeL128(MaiAT3PlusCoreDecoderChnACCTableTable acc5, int acc5_4, int acc5_360, 
            MaiAT3PlusCoreDecoderChnACCTableTable acc6, int acc6_4, int acc6_360,
            float* l128, int chn)
        {
            int rs = 0;

            var lo256 = stackalloc float[0x100];
            var lo128 = &lo256[0x80];

            makeSL128(acc5, lo128, 0x80, 0x80, acc5_4, acc5_360, chn);
            makeSL128(acc6, lo256, 0, 0x80, acc6_4, acc6_360, chn);

            if ( (acc5.num_uk > 0) && (acc6.num_uk > 0) && (acc5.unk[3] - 0x80 >= acc6.unk[2]) )
            {
                for (int a0 = 0; a0 < 0x80; a0++)
                {
                    lo128[a0] *= MaiAT3PlusCoreDecoder_StaticData.MAPCDSD_table_static_5[a0];
                    lo256[a0] *= MaiAT3PlusCoreDecoder_StaticData.MAPCDSD_table_static_4[a0];
                }
            }
            else
            {
                if (acc5.num_uk > 0)
                {
                    if (acc5.unk[1] == 0)
                    {
                        for (int a0 = 0; a0 < 0x80; a0++)
                        {
                            lo128[a0] *= MaiAT3PlusCoreDecoder_StaticData.MAPCDSD_table_static_5[a0];
                        }
                    }
                }
                if (acc6.num_uk > 0)
                {
                    if (acc6.unk[0] == 0)
                    {
                        for (int a0 = 0; a0 < 0x80; a0++)
                            lo256[a0] *= MaiAT3PlusCoreDecoder_StaticData.MAPCDSD_table_static_4[a0];
                    }
                }
            }

            for (int a0 = 0; a0 < 0x80; a0++)
            {
                l128[a0] = lo256[a0] + lo128[a0];
            }

            return rs;
        }
MaiAT3PlusCoreDecoder