I am trying to get sound effects to play properly in Linux with SDL_mixer. I can play music fine, and I can get the sound effect to play, except that the program waits for it to finish before moving on.
In order to remedy this I threaded off a short method to just play the sound. It works much better now except for 2 things:
1) When I go and look at the processes memory consumption it increase by ~8MB whenever I play a single sound. I read the SDL thread docs and it says that the thread will exit when the function passed to the SDL_CreateThread() method exits. I am not really sure what is wrong. Is there a better way to play multiple sound effects with SDL_mixer that I am missing? Or am I just threading incorrectly (All I do is use the SDL_CreateThread() method and move on letting the thread exit)?
2) My second question is: why does the memory consumption increase by ~8MB for each sound effect played... seems a bit excessive.
Well thats about it. Thanks in advance for all the help/advice.