Hi. I have a problem with SDL Mixer. I do not know how to read a sound file from a zip file. I know the functions Mix_QuickLoad_WAV and Mix_QuickLoad_RAW. But I do not know how to use them.
When I read the file from the zip, I get data of type char *. But if I use any of the above functions, with this data, this happens:
char * data = new char [dat.size]; zip_fread (ZIPFILE, data, dat.size); audio = Mix_QuickLoad_WAV(data); //audio = Mix_QuickLoad_WAV(data,dat.size);
Invalid conversion from ‘char *’ to 'Uint8 *.
I tried to do this but it does not work.
Uint8 * datos = reinterpret_cast <Uint8 *> (data); audio = Mix_QuickLoad_WAV(datos); //audio = Mix_QuickLoad_WAV(datos,dat.size);
If you can help me, please.
Thank you very much.