[Openal] Multiple local players

Charles Pence cpence at gmail.com
Sat Nov 24 12:30:55 PST 2007


Chris Robinson wrote:
> The (psuedo-)good news is that OpenAL Soft does work correctly with multiple 
> devices/contexts. As long as your card/driver supports it, just open the same 
> device twice, and get one context from each. Each context will then be one 
> listener. Make sure to set the correct context before manipulating its 
> sources, and you're good.

What's the potential overhead for this look like?  It would seem that 
I'd be loading each buffer into both contexts, keeping a full set of 
sources for both contexts, and manipulating them identically through 
some sort of a wrapper layer (presumably both at around 70% volume to 
prevent clipping?).  How much RAM would that eat up, assuming some 
reasonable number of buffers/sources for a small-ish game (maybe 40 or 
50 buffers, tops, and maybe sixteen sources/channels per context)?

Thanks for the idea.

-- Charles

P.S. INCREDIBLY happy to see that OpenAL Soft builds with CMake!  I'll 
be able to drop it right into my own CMake build system. =)


More information about the Openal mailing list