public void decode(BitStream inStream, ICSInfo info, Profile profile)
        {
            lag = 0;
            if (profile.type == Profile.ProfileType.AAC_LD)
            {
                lagUpdate = inStream.readBool();
                if (lagUpdate)
                {
                    lag = inStream.readBits(10);
                }
            }
            else
            {
                lag = inStream.readBits(11);
            }
            if (lag > (frameLength << 1))
            {
                throw new AACException("LTP lag too large: " + lag);
            }
            coef = inStream.readBits(3);

            int windowCount = info.getWindowCount();

            if (info.isEightShortFrame())
            {
                shortUsed       = new bool[windowCount];
                shortLagPresent = new bool[windowCount];
                shortLag        = new int[windowCount];
                for (int w = 0; w < windowCount; w++)
                {
                    if (shortUsed[w] = inStream.readBool())
                    {
                        shortLagPresent[w] = inStream.readBool();
                        if (shortLagPresent[w])
                        {
                            shortLag[w] = inStream.readBits(4);
                        }
                    }
                }
            }
            else
            {
                lastBand = Math.Min(info.getMaxSFB(), MAX_LTP_SFB);
                longUsed = new bool[lastBand];
                for (int i = 0; i < lastBand; i++)
                {
                    longUsed[i] = inStream.readBool();
                }
            }
        }