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

MAPCDSF_decodeTable0_Route5() static private method

static private MAPCDSF_decodeTable0_Route5 ( MaiBitReader mbr0, MaiAT3PlusCoreDecoderChnInfo chn_info ) : int
mbr0 CSPspEmu.Hle.Formats.audio.At3.SUB.MaiBitReader
chn_info MaiAT3PlusCoreDecoderChnInfo
return int
        static int MAPCDSF_decodeTable0_Route5(MaiBitReader mbr0, MaiAT3PlusCoreDecoderChnInfo chn_info)
        {
            int rs = 0;

            chn_info.table0_flag_data_num = mbr0.getWithI32Buffer(2);

            if ((rs = MAPCDSF_decodeTable0DataNum(mbr0, chn_info)) != 0) return rs;

            if (chn_info.table0_data_num0 != 0)
            {
                uint uk1c6e0 = (uint)mbr0.getWithI32Buffer(2);

                MaiAT3PlusCoreDecoderSearchTableDes huff_table_now = MaiAT3PlusCoreDecoder_StaticData.MAPCDSD_huff_table0[uk1c6e0];

                chn_info.table0[0] = chn_info.chn_ref.table0[0] + MAPCDSF_getHuffValue(huff_table_now, mbr0);
                chn_info.table0[0] &= 0x7;

                for (uint a0 = 1; a0 < chn_info.table0_data_num0; a0++)
                {
                    chn_info.table0[a0] = chn_info.chn_ref.table0[a0] - chn_info.chn_ref.table0[a0 - 1] + chn_info.table0[a0 - 1] + MAPCDSF_getHuffValue(huff_table_now, mbr0);
                    chn_info.table0[a0] &= 0x7;
                }
            }

            if ((rs = MAPCDSF_padTable0(mbr0, chn_info)) != 0) return rs;

            return rs;
        }
MaiAT3PlusCoreDecoder