Esempio n. 1
0
        void ObjectBasicInfo(BitExtractor extractor, bool readAllBlocks)
        {
            int blocks = readAllBlocks ? 3 : extractor.Read(2);

            // Gain
            if ((blocks & 2) != 0)
            {
                int gainHelper = extractor.Read(2);
                gain = gainHelper switch {
                    0 => 1,
                    1 => 0,
                    2 => (gainHelper = extractor.Read(6)) < 15 ?
                    QMath.DbToGain(15 - gainHelper) : QMath.DbToGain(14 - gainHelper),
                    _ => - 1,
                };
            }

            // Priority - unneccessary, everything's rendered
            if ((blocks & 1) != 0 && !extractor.ReadBit())
            {
                extractor.Skip(5);
            }
        }