large and relative 3-d coordinate systems
Ben Supnik <[email protected]>
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
Hi Y'all, I hope this isn't too RTFM of a question, but: The game I work on allows the user to travel far enough that our coordinate origin needs to be reset to avoid losing precision. For OpenGL rendering, we do this about every 100,000 meters, to stay in a zone where the 32-bit GPU has adequate rendering precision. For OpenAL, if we want to do the same thing with source/listener locations, we'd have to change the location of the listener and all sources at once; if sound is rendered with the listener but not some sources moved, the roll-off/attenuation will be very wrong. So I found alcSuspendContext, which looks like what I want...I could call alcSuspendContext, set all my properties, and then call alcProcessContext. Two concerns: - In the ALSoft code, it appears that there is one AL-wide critical section. Is there a risk of audio under-runs from calling alcSuspendContext? Or is the double-buffer size for the AL usually large enough to avoid this? - The AL docs say: " In some implementations, process and suspend calls are each a NOP." Does that mean that in some implementations, suspend/process can't be used to 'batch' al changes, and there is a risk I would hear a partial update of my state data? It looks like the alternative would be to always use source-relative sound...is this generally considered a good practice or a hack? Thanks!! ben -- Scenery Home Page: http://scenery.x-plane.com/ Scenery blog: http://xplanescenery.blogspot.com/ Plugin SDK: http://www.xsquawkbox.net/xpsdk/ X-Plane Wiki: http://wiki.x-plane.com/ Scenery mailing list: [email protected] Developer mailing list: [email protected] _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal