Is this an SDL_Mixer or SDL bug?

I’m trying to load a sound effect.

FILE *f=fopen(“sound.wav”,“rb”);
SDL_RWops *rw= SDL_RWFromFP(f,0);
m_pvc[52]=Mix_LoadWAV_RW(rw,1); //This is the line that crashes.

This line works fine:

m_pvc[52]=Mix_LoadWAV(“sound.wav”);

I want to load all my sound effects from one big file. The upper 3 lines
of code must work for this to be possible. Is this a bug in SDL_Mixer or
the SDL library in general.

I’m trying to load a sound effect.

FILE *f=fopen(“sound.wav”,“rb”);
SDL_RWops *rw= SDL_RWFromFP(f,0);
m_pvc[52]=Mix_LoadWAV_RW(rw,1); //This is the line that crashes.

This line works fine:

m_pvc[52]=Mix_LoadWAV(“sound.wav”);

I want to load all my sound effects from one big file. The upper 3 lines
of code must work for this to be possible. Is this a bug in SDL_Mixer or
the SDL library in general.

I load samples from memory, files and other places without problem, so
it’s possible that the bug is in your code.

Any other relevant information about the crash, such as, the type of
crash?

What about assert(rw != 0) after the SDL_RWFromFP() call? While we are
at it, assert(f != 0) after the fopen() call?

–G