Skip to content

building 32 bit x86 with MSVC. #13

@pedrolcl

Description

@pedrolcl

This is important for our vcpkg.

Remove "compute_tick_conv.c"

This was the GCC only original function:

         /* Replaced this horrible obfuscated code: */
        {
            // pSMFData->tickConv = (EAS_U16) (((temp * 1024) / pSMFData->ppqn + 500) / 1000);
            uint64_t temp64;
            if (__builtin_mul_overflow(temp, 1024u, &temp64) ||
                    pSMFData->ppqn == 0 ||
                    (temp64 /= pSMFData->ppqn, false) ||
                    __builtin_add_overflow(temp64, 500, &temp64) ||
                    (temp64 /= 1000, false) ||
                    temp64 > 65535) {
                pSMFData->tickConv = 65535;
            } else {
                pSMFData->tickConv = (EAS_U16) temp64;
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions