INNER CODE UNIT · C++

shifted

TheAssemblyArmada/Vanilla-Conquer · common/auduncmp.cpp:28

        shifted = *src++;
        shifted <<= 2;
        code = (shifted & 0xFF00) >> 8;
        count = (shifted & 0x00FF) >> 2;

        switch (code) {
        case 2: // no compression...
            if (count & 0x20) {
                count <<= 3;          // here it's significant that (count) is signed:
                sample += count >> 3; // the sign bit will be copied by these shifts!
                *dst++ = clamp(sample, 0, 255);
                remaining--; // one byte added to output
            } else {
                for (++count; count > 0; --count) {
                    --remaining;
                    *dst++ = *src++;
                }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…