Resource Files using RWops

Hello :slight_smile:

I would like to work with own resource files using SDL v1.2 (including sdl_image and sdl_mixer). Reading and writing SDL_Surface from or to binary files works great, using SDL_LoadBMP_RW and SDL_SaveBMP_RW in case of SDL_RWFromFP. Unfortunately I cannot find the equivalent using MixChunk from SDL_mixer.h. I only found Mix_LoadWAV_RW (http://sdl.beuc.net/sdl.wiki/Mix_LoadWAV_RW) but no such Mix_SaveWAV_RW or so.

What’s the way to write sounds into resource files?

Kind regards
Glocke

/EDIT: I am using C++ - sorry, I forgot to write this :smiley:

Hi,

I tried to write “alen” and “abuf” (as array using alen as length) to file. Reading works as well. But it’s important to set “volume” to a value unequal to zero after reading.

Kind regards