[Openal] Multiple local players

Chris Robinson chris.kcat at gmail.com
Sat Nov 24 13:22:42 PST 2007


On Saturday 24 November 2007 12:30:55 pm Charles Pence wrote:
> 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)?

As far as OpenAL Soft is concerned, sources don't take up much memory (a bit 
over 100 bytes each), and buffers can be shared between devices. However, in 
a hardware environment (eg. with Creative's drivers using accelerated 
DirectSound), sources in one context can reduce the number of sources 
available for the other context (since you have limitted hardware voices, 
which may be taken when the source is created, when a buffer is attached to 
it, or when it's played).

I'm also not sure if the spec allows for sharing buffers across devices. 
Sources are per-context, but I'm having trouble finding where the spec 
mentions the scope of buffers (per-device or global). Hopefully someone with 
more knowledge can say.


More information about the Openal mailing list