Wave LoadWaveFromResource(rresResourceChunk chunk)
{
Wave wave = { 0 };
if (rresGetDataType(chunk.info.type) == RRES_DATA_WAVE) // Wave data
{
if ((chunk.info.compType == RRES_COMP_NONE) && (chunk.info.cipherType == RRES_CIPHER_NONE))
{
wave.frameCount = chunk.data.props[0];
wave.sampleRate = chunk.data.props[1];
wave.sampleSize = chunk.data.props[2];
wave.channels = chunk.data.props[3];
unsigned int size = wave.frameCount*wave.sampleSize*wave.channels/8;
wave.data = RL_CALLOC(size, 1);
memcpy(wave.data, chunk.data.raw, size);
}
RRES_LOG("RRES: %c%c%c%c: WARNING: Data must be decompressed/decrypted\n", chunk.info.type[0], chunk.info.type[1], chunk.info.type[2], chunk.info.type[3]);
}
If the chunk was compressed there is no
LoadWaveFromResourceChunkthat is called internally like the other loaders, and even if thecompTypeandcipherTypeflags are cleared manually you hit the warning: