I have recently started proramming with c++ and SDL and i am trying to learn by making a simple RPG game. In my sound-class i want to be able to play backgroundmusic and soundFx when needed. I am able to get the backgroundmusic running perfectly with Mix_Music and Mix_LoadMus(), but when attempting to load sound with Mix_Chunk and Mix_LoadWav() the program crashes instantly on startup.
i know the soundfiles works fine cause they work in the Mix_Music functions. Please help!
Yes, i noticed.. I also noticed that when i misspelled the file i wanted to load, i got the error message, but when everything is spelled correctly and should run fine, both the stdout.txt and stderr.txt are completely blank.
The easiest way to find out where it's crashing is to use a debugger. The alternative is to place print statements in your code until you have narrowed it down.
I tried to use a debugger, and everythink seems to work fine, except some minor faults in other classes. The debugger doesnt say anything about the soundclass..