I am using zziplib to have all of my games data files in one file. So far it
loads all my bitmaps fine, but now I am trying to grab sounds out of the zip
and SDL_Mixer is dying. Here is the code snipet:
SDL_RWops *sound_rw;
sound_rw = SDL_RWFromZZIP(“test/sounds/pop.wav”, “r”);
if(!sound_rw) {
cout << “crap…I didn’t load!” << endl;
} else {
cout << “sound was loaded fine” << endl;
}
if(!(hit=Mix_LoadWAV_RW(sound_rw, 0))){
printf(“Mixer Error : %s”, Mix_GetError());
}
SDL_FreeRW(sound_rw);
When doing this I get the following error:
Mixer Error: Error reading from datastream
So it appears to me the SDL_RWops is getting setup correctly, but for whatever
reason SDL_Mixer isn’t wanting to load the sound from it correctly.
Other info:
gcc 3.3.3
SDL 1.2.7
SDL_Mixer 1.2.5
zziplib: 0.13.33
Anyone have any clues?
-Nathan