Re: Two more questions
Jason Daly <[email protected]> Mon, 19 Nov 2012 11:29:20 -0500
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
On 11/16/2012 06:32 PM, Eric Wing wrote: > Actually, this has been one of my long time gripes with OpenAL. I need > both multiple contexts and I need both of them to render sound > simultaneously. It isn't a major use, but it comes up enough for me. > > I want multiple contexts (listeners) for several different scenarios: > - Multiple views (your split screen example, or think of a 1st person > flight combat with a radar view). For compartmentalized/modular > development, trying to not trample over different module's state is a > pain. > - Menu views: very similar to the above; everything emanating from the > menu is probably not spatialized. But the main view may still be going > and playing sounds. Again, the menu person/team shouldn't have to > worry about the game person/team screwing with the listener position > or vice-versa. > > - Multiple simulations: The Corona SDK is the best example of this > problem. In the Corona SDK, we allow users to write apps/games for > iOS/Android in Lua. Our Mac/Windows simulator product allows them to > run their code as a regular Mac/Windows program. The OpenAL system > only allows us have one active context at a time so we can't run two > different user app/simulations at the same time (there are use cases > for this; imagine a multiplayer game). In fact, our main application > window is written in our own product which is left open at all times > by some users and provides links to documentation and our RSS feeds > and is just another simulation. We had to make a special hack to > disable audio it would never interfere with the user's audio. If I'm not mistaken, OpenAL-Soft allows you to have multiple contexts active (one per thread) using the alcSetThreadContext function. This is part of the ALC_EXT_thread_local_context extension. I'm not sure how well this feature is tested, though, and I believe it's only available in OpenAL-Soft right now. --"J" _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal