I kind of have an issue here with SDL_Mixer and threading. In my game there is a state where I load a specifig amount of sounds / music, using “Mix_LoadWAV” function. Then I play some of them after they’ve been loaded (using "Mix_PlayChannel(-1, someSample, 0). And here is my problem:
While the game is running (with specific sounds being played) I started a new thread (once), which is executed concurrently. In this thread I’m trying to load new sounds using “Mix_LoadWAV” again. But it seems like if SDL_Mixer is playing samples “Mix_LoadWAV” would be affected. So the whole application pauses until this function has finished. The threading is working correctly, 'cause other things I’m loading in the same thread do work and wouldn’t pause the application. Did anyone have the same problem? Are there any solutions?