Ok i tried another sdl way with wave files.
Therfore i use:
/* Load a wave file of the mixer format from a memory buffer */
extern DECLSPEC Mix_Chunk * SDLCALL Mix_QuickLoad_WAV(Uint8 *mem);
/* Load a wave file of the mixer format from a memory buffer */
extern DECLSPEC Mix_Chunk * SDLCALL Mix_QuickLoad_WAV(Uint8 *mem);
To copy to clipboard, switch view to plain text mode
This compiles correct but if i call this the app crashes
QFile myFile
(":data/resources/data/beep.wav");
if(!myFile.
open(QIODevice::ReadOnly)) cout <<
"could not load wav" << endl;
//
Uint8 *myMem = new Uint8;
quint8 tempMem1;
in >> tempMem1;
quint8 *tempMem2 = new quint8;
tempMem2 = &tempMem1;
myMem = tempMem2;
Mix_QuickLoad_WAV(myMem);
QFile myFile(":data/resources/data/beep.wav");
if(!myFile.open(QIODevice::ReadOnly)) cout << "could not load wav" << endl;
QDataStream in(&myFile);
//
Uint8 *myMem = new Uint8;
quint8 tempMem1;
in >> tempMem1;
quint8 *tempMem2 = new quint8;
tempMem2 = &tempMem1;
myMem = tempMem2;
Mix_QuickLoad_WAV(myMem);
To copy to clipboard, switch view to plain text mode
What is wrong here?
Bookmarks