machoman811 Posted January 23, 2010 Share Posted January 23, 2010 Hi! I'm having problems while trying to use a second thread to call the loadsound function from LW. From my understanding, the issue might not be exactly with the sound system. Correct me if I'm wrong, but it seems like the sounds are linked together with the current tworld.. and that's a problem if you're working with a thread since you never know which is the current world (since I have many). Maybe I'm wrong though... I don't have the engine's sources so I can't confirm my hypothesis. If I'm right, I may have to re-implement the sound engine (probably with openal again) like I did with the physics engine (I needed more control over it)... but I would like to prevent that since it does work properly right now if I don't switch from one world to the other in the loading phase of the sounds.. Anyway.... Quote Link to comment Share on other sites More sharing options...
Rick Posted January 23, 2010 Share Posted January 23, 2010 From my understanding there are no thread safe commands in LE. It's not a thread safe library currently. Quote Link to comment Share on other sites More sharing options...
machoman811 Posted January 24, 2010 Author Share Posted January 24, 2010 From my understanding there are no thread safe commands in LE. It's not a thread safe library currently. I understand that but I believe that having the sounds and graphics engines on different threads should still be possible. I just need to have enough information on the sources. For instance, I realized that, in the case the non thread safe thing is creation of the sources, I could try loading the sounds on the thread and creating the sources upon every play commmands.. Since those commands are normally sent from the entity that's part of a specific world.. it could work. Anyway, I'll try that out but I still need more inputs from you all. Quote Link to comment Share on other sites More sharing options...
Rick Posted January 24, 2010 Share Posted January 24, 2010 There have been posts on threading before and they generally don't turn out very well. Not to discourage you but do some forum searches for threading and see what others have found. It might help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.