Open H-Art-Src opened 5 months ago
Possibly related to https://github.com/raysan5/raylib/issues/1423
@H-Art-Src Thanks for reporting! Did you verify the data returned by LoadWaveFromResource()
is correct?
Sound SOUND;
int id = rresGetResourceId(ASSETS_DIR , filename);
if(id)//raysan made this shit bugged for certain wav files I'M GOING TO WORK ON RAYLIB
{
printf("~Loaded sound from rres~\n");
rresResourceChunk chunk = rresLoadResourceChunk( "resources/DATA.rres" , id);
UnpackResourceChunk(&chunk);
Wave tempWave = LoadWaveFromResource(chunk);
SOUND = LoadSoundFromWave(tempWave); // still segfaults here
UnloadWave(tempWave);
rresUnloadResourceChunk(chunk);
}
Realized LoadWaveFromResource()
should be passing chunk
, but it's still segfaulting from LoadSoundFromWave()
.
Unpacked sound is reported to be 28,653,396 bytes from FS.
What the log shows when commentating out SOUND = LoadSoundFromWave(tempWave);
:
RRES: INFO: Loading resource from file: resources/DATA.rres
RRES: INFO: Found requested resource id: 0x18705889
RRES: WAVE: Id: 0x18705889 | Base size: 28653372 | Packed size: 28653372
RRES: WAVE: WARNING: Data must be decompressed/decrypted
@H-Art-Src Please, could you provide some sample with files for testing?
https://mega.nz/folder/eNAjkK5J#3bnJLs4h0I_u5aQANkZl4Q White noise packed and unpacked
If the packaged wav file is too large, approximately > 10 mb, LoadSoundFromWave() segfaults.