[SDL] [SDL_mixer] sound is lost after alt+tab

apator10 at wp.pl apator10 at wp.pl
Sat Mar 30 21:06:45 PDT 2013


Hi Oogst, 

I believe there already have been several answers to this. Simply put most people suggest

1. Keep the rendering on the main thread
2. Call SDL_PumpEvents on the main thread as well
3. SDL_PollEvent on the input thread

If this does not work, then you have to do what I have done, which is to also call SDL_PollEvent on the main thread as well, and put it into a thread safe data structure, that you can then read from your input thread. As I have later discovered, this should not be necessary, as the SDL_event queue is already thread safe.


On Thursday, March 14, 2013 at 8:29 AM, Oogst wrote: 
> Anyone any idea how to solve this?
> 
> 
> 
> Ronimo Games, Awesomenauts, Proun, Swords & Soldiers, De Blob 
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org (mailto:SDL at lists.libsdl.org)
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130315/cb82cc5f/attachment-0009.htm>


More information about the SDL mailing list