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

MAPCDSF_decodeTable0_Route3() static private method

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

            chn_info.table0_flag_ex = mbr0.getWithI32Buffer(2);
            chn_info.table0_flag_data_num = mbr0.getWithI32Buffer(2);

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

            if (chn_info.table0_data_num0 > 0)
            {
                uint huff_table_type0 = (uint)mbr0.getWithI32Buffer(2);

                chn_info.table0[0] = (uint)mbr0.getWithI32Buffer(3);

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

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

            if (chn_info.table0_flag_ex != 0)
            {
                MAPCDSF_exTable0Value(chn_info);
            }

            return rs;
        }
MaiAT3PlusCoreDecoder