EasyRPG / Player

RPG Maker 2000/2003 and EasyRPG games interpreter
https://easyrpg.org/player/
GNU General Public License v3.0
991 stars 185 forks source link

Update dr_wav to v0.13.12 #3115

Closed carstene1ns closed 11 months ago

carstene1ns commented 12 months ago

This brings us crash fixes and AIFF/RIFX support.

Ghabry commented 12 months ago

Thanks for the update. I checked the source to figure out the fourcc codes drwav supports right now, useful for a later audio decoder update:

    if (drwav_fourcc_equal(riff, "RIFF")) {
        pWav->container = drwav_container_riff;
    } else if (drwav_fourcc_equal(riff, "RIFX")) {
        pWav->container = drwav_container_rifx;
    } else if (drwav_fourcc_equal(riff, "riff")) {
        int i;
        drwav_uint8 riff2[12];

        pWav->container = drwav_container_w64;

        /* Check the rest of the GUID for validity. */
        if (drwav__on_read(pWav->onRead, pWav->pUserData, riff2, sizeof(riff2), &cursor) != sizeof(riff2)) {
            return DRWAV_FALSE;
        }

        for (i = 0; i < 12; ++i) {
            if (riff2[i] != drwavGUID_W64_RIFF[i+4]) {
                return DRWAV_FALSE;
            }
        }
    } else if (drwav_fourcc_equal(riff, "RF64")) {
        pWav->container = drwav_container_rf64;
    } else if (drwav_fourcc_equal(riff, "FORM")) {
        pWav->container = drwav_container_aiff;
    } else {
        return DRWAV_FALSE;   /* Unknown or unsupported container. */
    }

Complete list:

RIFF
RIFX
riff
RF64
FORM

These are more formats than we list for libsndfile right now but the list is just incomplete.