Something in the WAV loader is confusing GCC: when compiled with -O2, WAV_MemoryLoad() reads corrupt data. It is likely that the optimizer gets the manipulation of the 'data' pointer wrong.
This commit disables GCC optimization for the WAV_MemoryLoad() function, fixing the issue.
Fixed|GCC: Segfault when loading WAV data
Something in the WAV loader is confusing GCC: when compiled with -O2,
WAV_MemoryLoad() reads corrupt data. It is likely that the optimizer
gets the manipulation of the 'data' pointer wrong.
This commit disables GCC optimization for the WAV_MemoryLoad() function,
fixing the issue.